[PATCH 01/15] staging: usbip: userspace: libsrc: replace numbers by ascii

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



replace numbers in code by ascii text constants as suggested
by Dan Carpenter:
http://driverdev.linuxdriverproject.org/pipermail/devel/2013-February/035907.html

Signed-off-by: Stefan Reif <ke42caxa@xxxxxxxxxxxxx>
---
 drivers/staging/usbip/userspace/libsrc/names.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/usbip/userspace/libsrc/names.c b/drivers/staging/usbip/userspace/libsrc/names.c
index 3b151df..72480fb 100644
--- a/drivers/staging/usbip/userspace/libsrc/names.c
+++ b/drivers/staging/usbip/userspace/libsrc/names.c
@@ -491,10 +491,10 @@ static void parse(FILE *f)
 	while (fgets(buf, sizeof(buf), f)) {
 		linectr++;
 		/* remove line ends */
-		cp = strchr(buf, 13);
+		cp = strchr(buf, '\r');
 		if (cp)
 			*cp = 0;
-		cp = strchr(buf, 10);
+		cp = strchr(buf, '\n');
 		if (cp)
 			*cp = 0;
 		if (buf[0] == '#' || !buf[0])
-- 
1.8.1

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux