c-type functions / makros need a cast to unsigned char, not int
authorflorian <florian@openbsd.org>
Sun, 3 Aug 2014 22:06:51 +0000 (22:06 +0000)
committerflorian <florian@openbsd.org>
Sun, 3 Aug 2014 22:06:51 +0000 (22:06 +0000)
"feel free to commit" reyk@

usr.sbin/httpd/server_fcgi.c

index 3ad68fc..53638ae 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: server_fcgi.c,v 1.17 2014/08/03 20:43:03 reyk Exp $   */
+/*     $OpenBSD: server_fcgi.c,v 1.18 2014/08/03 22:06:51 florian Exp $        */
 
 /*
  * Copyright (c) 2014 Florian Obser <florian@openbsd.org>
@@ -523,8 +523,8 @@ server_fcgi_writeheader(struct client *clt, struct kv *hdr, void *arg)
                return (-1);
 
        for (p = name; *p != '\0'; p++) {
-               if (isalpha((int)*p))
-                       *p = (char)toupper((int)*p);
+               if (isalpha((unsigned char)*p))
+                       *p = toupper((unsigned char)*p);
                else
                        *p = '_';
        }