]> git.openfabrics.org - ~emulex/infiniband.git/commitdiff
staging: usbip: userspace: libsrc: replace numbers by ascii
authorStefan Reif <ke42caxa@cip.cs.fau.de>
Thu, 4 Apr 2013 14:03:02 +0000 (16:03 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 5 Apr 2013 21:22:49 +0000 (14:22 -0700)
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@cip.cs.fau.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/usbip/userspace/libsrc/names.c

index 3b151dff85a6d4821d050297791fd57494b3284f..72480fb9976eebdcdfb1e677ded079edef0b7df6 100644 (file)
@@ -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])