Author: pjd Date: Sun Aug 18 11:25:42 2013 New Revision: 254486 URL: http://svnweb.freebsd.org/changeset/base/254486
Log: Cast argument of is*() ctype functions to unsigned char. Without the cast there is ambiguity between 0xFF and -1 (EOF). Suggested by: jilles Submitted by: Mariusz Zaborski <osho...@freebsd.org> Sponsored by: Google Summer of Code 2013 Modified: head/usr.sbin/rwhod/rwhod.c Modified: head/usr.sbin/rwhod/rwhod.c ============================================================================== --- head/usr.sbin/rwhod/rwhod.c Sun Aug 18 10:44:37 2013 (r254485) +++ head/usr.sbin/rwhod/rwhod.c Sun Aug 18 11:25:42 2013 (r254486) @@ -337,8 +337,11 @@ verify(char *name, int maxlen) size = 0; while (*name != '\0' && size < maxlen - 1) { - if (!isascii(*name) || !(isalnum(*name) || ispunct(*name))) + if (!isascii((unsigned char)*name) || + !(isalnum((unsigned char)*name) || + ispunct((unsigned char)*name))) { return (0); + } name++; size++; } _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"