diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2013-11-27 00:13:25 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2013-11-27 00:13:25 +0000 |
commit | ef097c6cedf88afc598e7a8443d251a3e5b47e40 (patch) | |
tree | 923f4462f66065f5a840afcf7c3009dff0c8ef8d /usr.bin/tsort | |
parent | 385a21ed3ab2179b683f853ef3993bfea0cb4548 (diff) |
unsigned char for ctype
ok okan
Diffstat (limited to 'usr.bin/tsort')
-rw-r--r-- | usr.bin/tsort/tsort.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/usr.bin/tsort/tsort.c b/usr.bin/tsort/tsort.c index 745de72c7f5..de242dcb581 100644 --- a/usr.bin/tsort/tsort.c +++ b/usr.bin/tsort/tsort.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tsort.c,v 1.21 2012/03/29 22:04:28 jmc Exp $ */ +/* $OpenBSD: tsort.c,v 1.22 2013/11/27 00:13:24 deraadt Exp $ */ /* ex:ts=8 sw=4: * * Copyright (c) 1999-2004 Marc Espie <espie@openbsd.org> @@ -315,11 +315,13 @@ read_pairs(FILE *f, struct ohash *h, int reverse, const char *name, for (;;) { char *e; - while (str < sentinel && isspace(*str)) + while (str < sentinel && + isspace((unsigned char)*str)) str++; if (str == sentinel) break; - for (e = str; e < sentinel && !isspace(*e); e++) + for (e = str; + e < sentinel && !isspace((unsigned char)*e); e++) continue; if (toggle) { a = node_lookup(h, str, e); @@ -363,11 +365,12 @@ read_hints(FILE *f, struct ohash *h, int quiet, const char *name, char *e; struct node *a; - while (str < sentinel && isspace(*str)) + while (str < sentinel && isspace((unsigned char)*str)) str++; if (str == sentinel) break; - for (e = str; e < sentinel && !isspace(*e); e++) + for (e = str; + e < sentinel && !isspace((unsigned char)*e); e++) continue; a = node_lookup(h, str, e); if (a->order != NO_ORDER) { |