From: deraadt Date: Tue, 7 Jan 2014 14:08:16 +0000 (+0000) Subject: ctype cleanups; ok okan X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=03829ff5af01c0ceff9bf7ab1e961ec23aca9f27;p=openbsd ctype cleanups; ok okan --- diff --git a/usr.bin/rcs/rcs.c b/usr.bin/rcs/rcs.c index 02968b10032..e296b88a0fe 100644 --- a/usr.bin/rcs/rcs.c +++ b/usr.bin/rcs/rcs.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rcs.c,v 1.79 2012/03/03 08:34:27 nicm Exp $ */ +/* $OpenBSD: rcs.c,v 1.80 2014/01/07 14:08:16 deraadt Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau * All rights reserved. @@ -633,7 +633,7 @@ int rcs_sym_check(const char *sym) { int ret; - const char *cp; + const unsigned char *cp; ret = 1; cp = sym; @@ -1795,7 +1795,7 @@ int rcs_state_check(const char *state) { int ret; - const char *cp; + const unsigned char *cp; ret = 0; cp = state; diff --git a/usr.bin/rcs/rcsnum.c b/usr.bin/rcs/rcsnum.c index cd599e80cae..428fa76b350 100644 --- a/usr.bin/rcs/rcsnum.c +++ b/usr.bin/rcs/rcsnum.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rcsnum.c,v 1.13 2011/05/20 19:21:10 nicm Exp $ */ +/* $OpenBSD: rcsnum.c,v 1.14 2014/01/07 14:08:16 deraadt Exp $ */ /* * Copyright (c) 2004 Jean-Francois Brousseau * All rights reserved. @@ -247,7 +247,7 @@ rcsnum_aton(const char *str, char **ep, RCSNUM *nump) nump->rn_id[0] = 0; for (sp = str;; sp++) { - if (!isdigit(*sp) && (*sp != '.')) + if (!isdigit((unsigned char)*sp) && (*sp != '.')) break; if (*sp == '.') { diff --git a/usr.bin/rcs/rlog.c b/usr.bin/rcs/rlog.c index 0eec9389239..ff66dc8ed71 100644 --- a/usr.bin/rcs/rlog.c +++ b/usr.bin/rcs/rlog.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rlog.c,v 1.66 2013/06/03 17:04:35 jcs Exp $ */ +/* $OpenBSD: rlog.c,v 1.67 2014/01/07 14:08:16 deraadt Exp $ */ /* * Copyright (c) 2005, 2009 Joris Vink * Copyright (c) 2005, 2006 Xavier Santolaria @@ -232,7 +232,7 @@ rlog_select_daterev(RCSFILE *rcsfile, char *date) delim = '\0'; last = "\0"; } else { - while (*last && isspace(*last)) + while (*last && isspace((unsigned char)*last)) last++; }