summaryrefslogtreecommitdiff
path: root/lib/plist.c
diff options
context:
space:
mode:
authorDavid Lamparter <equinox@diac24.net>2019-08-06 16:54:52 +0200
committerDavid Lamparter <equinox@diac24.net>2019-08-06 16:54:52 +0200
commitfefa5e0ff5af98d8258987e21422243926ee2b3c (patch)
tree05ad830d4a48048156689b15a5c84df124964cb6 /lib/plist.c
parent7040d52aafca16fb0048c1712a919d8209c54dc9 (diff)
*: fix ctype (isalpha & co.) casts
The correct cast for these is (unsigned char), because "char" could be signed and thus have some negative value. isalpha & co. expect an int arg that is positive, i.e. 0-255. So we need to cast to (unsigned char) when calling any of these. Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
Diffstat (limited to 'lib/plist.c')
-rw-r--r--lib/plist.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/plist.c b/lib/plist.c
index 1ba8982499..64571a05b7 100644
--- a/lib/plist.c
+++ b/lib/plist.c
@@ -218,7 +218,7 @@ static struct prefix_list *prefix_list_insert(afi_t afi, int orf,
/* If name is made by all digit character. We treat it as
number. */
for (number = 0, i = 0; i < strlen(name); i++) {
- if (isdigit((int)name[i]))
+ if (isdigit((unsigned char)name[i]))
number = (number * 10) + (name[i] - '0');
else
break;