sprinkle tons more ord() around

this is really not funny… mksh-ng will use even more “unsigned only”
This commit is contained in:
tg
2017-05-05 22:53:32 +00:00
parent 5c72925bf3
commit 868d982efb
11 changed files with 423 additions and 412 deletions

View File

@@ -38,7 +38,7 @@
#endif
#endif
__RCSID("$MirOS: src/bin/mksh/funcs.c,v 1.349 2017/04/28 11:48:46 tg Exp $");
__RCSID("$MirOS: src/bin/mksh/funcs.c,v 1.350 2017/05/05 22:53:28 tg Exp $");
#if HAVE_KILLPG
/*
@@ -2298,8 +2298,9 @@ c_unset(const char **wp)
size_t n;
n = strlen(id);
if (n > 3 && id[n-3] == '[' && id[n-2] == '*' &&
id[n-1] == ']') {
if (n > 3 && ord(id[n - 3]) == ord('[') &&
ord(id[n - 2]) == ord('*') &&
ord(id[n - 1]) == ord(']')) {
strndupx(cp, id, n - 3, ATEMP);
id = cp;
optc = 3;