nolo: Show only first 20 error messages, fix possible infinity loop

This commit is contained in:
Pali Rohár committed 2013-02-25 11:32:28 +01:00
1 parent b997951f97
commit 5ca1e0c899
1 file changed
+2 -2
+2 -2
View File
@@ -83,9 +83,9 @@
static void nolo_error_log(struct usb_device_info * dev, int only_clear) { static void nolo_error_log(struct usb_device_info * dev, int only_clear) {
char buf[2048]; char buf[2048];
size_t i; size_t i, count;
while ( 1 ) { for ( count = 0; count < 20; ++count ) {
memset(buf, 0, sizeof(buf)); memset(buf, 0, sizeof(buf));