V4L/DVB: ir-core: fix gcc warning noise
authorMauro Carvalho Chehab <mchehab@redhat.com>
Thu, 8 Apr 2010 12:33:45 +0000 (09:33 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Wed, 19 May 2010 15:57:03 +0000 (12:57 -0300)
drivers/media/IR/ir-sysfs.c: In function â€˜store_protocol’:
drivers/media/IR/ir-sysfs.c:93: warning: suggest parentheses around assignment used as truth value

Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/IR/ir-sysfs.c

index e47a4f1..af1edd0 100644 (file)
@@ -91,7 +91,7 @@ static ssize_t store_protocol(struct device *d,
        unsigned long flags;
        char *buf;
 
-       while (buf = strsep((char **) &data, " \n")) {
+       while ((buf = strsep((char **) &data, " \n")) != NULL) {
                if (!strcasecmp(buf, "rc-5") || !strcasecmp(buf, "rc5"))
                        ir_type |= IR_TYPE_RC5;
                if (!strcasecmp(buf, "pd") || !strcasecmp(buf, "pulse-distance"))