提交 9c46c7fa 编写于 作者: M Mauro Carvalho Chehab

[media] radio-miropcm20: fix a compilation warning

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: NMauro Carvalho Chehab <m.chehab@samsung.com>
上级 69cc4bfa
......@@ -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;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册