Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 1 Aug 2011 13:40:48 +0000 (UTC)
From:      Alexander Motin <mav@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-projects@freebsd.org
Subject:   svn commit: r224574 - projects/hid/usr.bin/usbhidctl
Message-ID:  <201108011340.p71DemM3099144@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mav
Date: Mon Aug  1 13:40:48 2011
New Revision: 224574
URL: http://svn.freebsd.org/changeset/base/224574

Log:
  Fix bug in previous change.

Modified:
  projects/hid/usr.bin/usbhidctl/usbhid.c

Modified: projects/hid/usr.bin/usbhidctl/usbhid.c
==============================================================================
--- projects/hid/usr.bin/usbhidctl/usbhid.c	Mon Aug  1 13:17:59 2011	(r224573)
+++ projects/hid/usr.bin/usbhidctl/usbhid.c	Mon Aug  1 13:40:48 2011	(r224574)
@@ -90,6 +90,9 @@ parceargs(report_desc_t r, int all, int 
 				if (tmp1 != NULL) {
 					cp -= strlen(tmp1);
 					tmp1[0] = 0;
+				} else {
+					cp = 0;
+					colls[0] = 0;
 				}
 			}
 			if ((h.kind != hid_input && h.kind != hid_output &&
@@ -141,6 +144,9 @@ parceargs(report_desc_t r, int all, int 
 				if (tmp1 != NULL) {
 					cp -= strlen(tmp1);
 					tmp1[0] = 0;
+				} else {
+					cp = 0;
+					colls[0] = 0;
 				}
 			}
 			if ((h.kind != hid_input && h.kind != hid_output &&



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201108011340.p71DemM3099144>