Fix "warning: comparison is always false due to limited range of data type"

on platforms with unsigned chars. The comparison in question is there to
determine whether chars are unsigned or not and is based on comparing a
char, initialized to -1, for less than 0. Change the comparison to check
for geater than 0 instead...
This commit is contained in:
Marcel Moolenaar 2008-02-18 20:01:33 +00:00
parent 0943a3b7ec
commit 2912059a85
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=176392

View File

@ -139,10 +139,7 @@ main(int argc __unused, char **argv __unused)
/* Determine the characteristics of chars. */
c = -1;
if (c < 0)
sign = 1;
else
sign = 0;
sign = (c > 0) ? 0 : 1;
for (nbits = 1 ; ; nbits++) {
d = (1 << nbits) - 1;
if (d == c)