lib/vsprintf.c: fix comparison to bool
authorFabian Frederick <fabf@skynet.be>
Wed, 4 Jun 2014 23:11:52 +0000 (16:11 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 4 Jun 2014 23:54:18 +0000 (16:54 -0700)
Fixing 2 coccinelle warnings:
lib/vsprintf.c:2350:2-9: WARNING: Assignment of bool to 0/1
lib/vsprintf.c:2389:3-10: WARNING: Assignment of bool to 0/1

Signed-off-by: Fabian Frederick <fabf@skynet.be>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
lib/vsprintf.c

index 0648291cdafe8d6358914c5c2fa737c31d39704d..6fe2c84eb055695ffb80e766bd2d6fda1005b315 100644 (file)
@@ -2347,7 +2347,7 @@ int vsscanf(const char *buf, const char *fmt, va_list args)
                        break;
 
                base = 10;
-               is_sign = 0;
+               is_sign = false;
 
                switch (*fmt++) {
                case 'c':
@@ -2386,7 +2386,7 @@ int vsscanf(const char *buf, const char *fmt, va_list args)
                case 'i':
                        base = 0;
                case 'd':
-                       is_sign = 1;
+                       is_sign = true;
                case 'u':
                        break;
                case '%':