summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2022-12-15 18:20:40 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2022-12-15 18:20:40 +0000
commitfb145a59e411e55116f4e2d781103b3958634a89 (patch)
treec0b0ebb5d0a85638bf26106ec9d0270ca8e70e8c /usr.bin
parentf31e9c0b3b7f8e98c19aad103a00660c1caa551a (diff)
The idiomatic way of coping with signed char vs unsigned char (which
did not come from stdio read functions) in the presence of ctype macros, is to always cast to (unsigned char). casting to (int) for a "macro" which is documented to take int, is weird. And sadly wrong, because of the sing extension risk.. same diff from florian
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/ssh/misc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/ssh/misc.c b/usr.bin/ssh/misc.c
index 05fa81f1b65..2d6592758fe 100644
--- a/usr.bin/ssh/misc.c
+++ b/usr.bin/ssh/misc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: misc.c,v 1.178 2022/11/09 09:01:52 dtucker Exp $ */
+/* $OpenBSD: misc.c,v 1.179 2022/12/15 18:20:39 deraadt Exp $ */
/*
* Copyright (c) 2000 Markus Friedl. All rights reserved.
* Copyright (c) 2005-2020 Damien Miller. All rights reserved.
@@ -80,7 +80,7 @@ rtrim(char *s)
if ((i = strlen(s)) == 0)
return;
for (i--; i > 0; i--) {
- if (isspace((int)s[i]))
+ if (isspace((unsigned char)s[i]))
s[i] = '\0';
}
}