]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
[media] radio-miropcm20: fix a compilation warning
authorMauro Carvalho Chehab <m.chehab@samsung.com>
Fri, 25 Jul 2014 22:33:40 +0000 (19:33 -0300)
committerMauro Carvalho Chehab <m.chehab@samsung.com>
Fri, 25 Jul 2014 22:35:16 +0000 (19:35 -0300)
drivers/media/radio/radio-miropcm20.c: In function 'sanitize':
drivers/media/radio/radio-miropcm20.c:216:3: warning: comparison is always false due to limited range of data type [-Wtype-limits]
   if (p[i] < 32 || p[i] >= 128) {
   ^

As p is declared as a char array, it is signed. So, it can never
be bigger than 127.

Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
drivers/media/radio/radio-miropcm20.c

index 72df00eee81f4108da368fe42501abfee30949e4..ac9915d15f6695c3e57b2b739dc9f96599553650 100644 (file)
@@ -213,7 +213,7 @@ static bool sanitize(char *p, int size)
        bool ret = true;
 
        for (i = 0; i < size; i++) {
-               if (p[i] < 32 || p[i] >= 128) {
+               if (p[i] < 32) {
                        p[i] = ' ';
                        ret = false;
                }