From 5ca1e0c899de92d1ebbedb0e0c83efc4c3a3e6a8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pali=20Roh=C3=A1r?= Date: Mon, 25 Feb 2013 11:32:28 +0100 Subject: [PATCH] nolo: Show only first 20 error messages, fix possible infinity loop --- src/nolo.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/nolo.c b/src/nolo.c index dfb2034..238336d 100644 --- a/src/nolo.c +++ b/src/nolo.c @@ -83,9 +83,9 @@ static void nolo_error_log(struct usb_device_info * dev, int only_clear) { char buf[2048]; - size_t i; + size_t i, count; - while ( 1 ) { + for ( count = 0; count < 20; ++count ) { memset(buf, 0, sizeof(buf));