[git commit] ash: fix "char == CTLfoo" comparison signedness bug
Denys Vlasenko
vda.linux at googlemail.com
Fri Mar 30 21:04:39 UTC 2018
commit: https://git.busybox.net/busybox/commit/?id=ac61f447040479f7a852ae2c1262915274496f49
branch: https://git.busybox.net/busybox/commit/?id=refs/heads/master
It usually does not bite since bbox forces -funsigned-char build.
But for some reason void linux people disabled that.
Signed-off-by: Denys Vlasenko <vda.linux at googlemail.com>
---
shell/ash.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/shell/ash.c b/shell/ash.c
index c957b001e..8fb32c1ae 100644
--- a/shell/ash.c
+++ b/shell/ash.c
@@ -7439,13 +7439,13 @@ hasmeta(const char *p)
p = strpbrk(p, chars);
if (!p)
break;
- switch ((unsigned char) *p) {
+ switch ((unsigned char)*p) {
case CTLQUOTEMARK:
for (;;) {
p++;
- if (*p == CTLQUOTEMARK)
+ if ((unsigned char)*p == CTLQUOTEMARK)
break;
- if (*p == CTLESC)
+ if ((unsigned char)*p == CTLESC)
p++;
if (*p == '\0') /* huh? */
return 0;
More information about the busybox-cvs
mailing list