Skip to content

Commit e64e533

Browse files
librpc/wsp: use unsigned char for high byte comparison
../../librpc/wsp/wsp_util.c:244:28: warning: result of comparison of constant 160 with expression of type 'char' is always false [-Wtautological-constant-out-of-range-compare] 244 | if (strlen(t) == 1 && *t == 0xa0) { Signed-off-by: Douglas Bagnall <[email protected]> Reviewed-by: Volker Lendecke <[email protected]>
1 parent 495ca09 commit e64e533

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

librpc/wsp/wsp_util.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ static bool parse_properties_line(TALLOC_CTX *ctx,
241241
for (pos = 0; pos < talloc_array_length(csv_line); pos++) {
242242
t = strv_next(strv, t);
243243
/* the scraped property file can have a non ascii char */
244-
if (strlen(t) == 1 && *t == 0xa0) {
244+
if (strlen(t) == 1 && *(unsigned char *)t == 0xa0) {
245245
csv_line[pos] = talloc_strdup(csv_line,
246246
"");
247247
} else {

0 commit comments

Comments
 (0)