This patch fixes the following checkpatch error:
-ERROR: do not use assignment in if condition
Signed-off-by: Kurt Kanzenbach <ly80toro@cip.cs.fau.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
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;
{
FILE *f;
- if (!(f = fopen(n, "r"))) {
+ f = fopen(n, "r");
+ if (!f)
return errno;
- }
+
parse(f);
fclose(f);
return 0;