Commit 6f19a2b1 authored by Kurt Kanzenbach's avatar Kurt Kanzenbach Committed by Greg Kroah-Hartman

staging: usbip: userspace: libsrc: removed assignments in if conditions

This patch fixes the following checkpatch error:
-ERROR: do not use assignment in if condition
Signed-off-by: default avatarKurt Kanzenbach <ly80toro@cip.cs.fau.de>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 9db91e1b
...@@ -491,9 +491,11 @@ static void parse(FILE *f) ...@@ -491,9 +491,11 @@ static void parse(FILE *f)
while (fgets(buf, sizeof(buf), f)) { while (fgets(buf, sizeof(buf), f)) {
linectr++; linectr++;
/* remove line ends */ /* remove line ends */
if ((cp = strchr(buf, 13))) cp = strchr(buf, 13);
if (cp)
*cp = 0; *cp = 0;
if ((cp = strchr(buf, 10))) cp = strchr(buf, 10);
if (cp)
*cp = 0; *cp = 0;
if (buf[0] == '#' || !buf[0]) if (buf[0] == '#' || !buf[0])
continue; continue;
...@@ -857,9 +859,10 @@ int names_init(char *n) ...@@ -857,9 +859,10 @@ int names_init(char *n)
{ {
FILE *f; FILE *f;
if (!(f = fopen(n, "r"))) { f = fopen(n, "r");
if (!f)
return errno; return errno;
}
parse(f); parse(f);
fclose(f); fclose(f);
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment