summaryrefslogtreecommitdiffstats
path: root/listen
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2017-01-31 11:42:30 +0100
committerRalf Baechle <ralf@linux-mips.org>2017-01-31 11:42:30 +0100
commitae7c84e27c72f85ce840db6261080d1187adeb4f (patch)
tree8644b4a09011f461dd195c330f37808c3b79c3a4 /listen
parent1de0ea4abd7153c6fcdbdbac6048a1e46f673fc2 (diff)
listen: Fix comparison broken by limited range of types.
gcc -DHAVE_CONFIG_H -I. -I.. -O2 -Wall -Wextra -pedantic -MT utils.o -MD -MP -MF .deps/utils.Tpo -c -o utils.o utils.c utils.c: In function ‘lprintf’: utils.c:73:27: warning: comparison is always true due to limited range of data type [-Wtype-limits] || (*p > 126 && *p < 160 && sevenbit)) ^ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'listen')
-rw-r--r--listen/utils.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/listen/utils.c b/listen/utils.c
index aa4d9e2..cf1a796 100644
--- a/listen/utils.c
+++ b/listen/utils.c
@@ -70,7 +70,7 @@ void lprintf(int dtype, char *fmt, ...)
} else {
for (p = str; *p != '\0'; p++)
if ((*p < 32 && *p != '\n')
- || (*p > 126 && *p < 160 && sevenbit))
+ || (*p > 126 && (unsigned char) *p < 160 && sevenbit))
*p = '.';
if (fputs(str, stdout) == -1)
exit(1);