Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 363338
b: refs/heads/master
c: 6f19a2b
h: refs/heads/master
v: v3
  • Loading branch information
Kurt Kanzenbach authored and Greg Kroah-Hartman committed Mar 11, 2013
1 parent 642977d commit 00e7e88
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9db91e1b4cdf23c28f7f932376bcdeafbd1aee28
refs/heads/master: 6f19a2b1c386d6ef75bcfebf5c1a68d28658d62e
11 changes: 7 additions & 4 deletions trunk/drivers/staging/usbip/userspace/libsrc/names.c
Original file line number Diff line number Diff line change
Expand Up @@ -491,9 +491,11 @@ static void parse(FILE *f)
while (fgets(buf, sizeof(buf), f)) {
linectr++;
/* remove line ends */
if ((cp = strchr(buf, 13)))
cp = strchr(buf, 13);
if (cp)
*cp = 0;
if ((cp = strchr(buf, 10)))
cp = strchr(buf, 10);
if (cp)
*cp = 0;
if (buf[0] == '#' || !buf[0])
continue;
Expand Down Expand Up @@ -857,9 +859,10 @@ int names_init(char *n)
{
FILE *f;

if (!(f = fopen(n, "r"))) {
f = fopen(n, "r");
if (!f)
return errno;
}

parse(f);
fclose(f);
return 0;
Expand Down

0 comments on commit 00e7e88

Please sign in to comment.