]> err.no Git - varnish/commitdiff
Avoid <ctype.h> entirely
authorphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Sat, 21 Jun 2008 20:56:14 +0000 (20:56 +0000)
committerphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Sat, 21 Jun 2008 20:56:14 +0000 (20:56 +0000)
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2762 d4fa192b-c00b-0410-8231-f00ffab90ce4

varnish-cache/bin/varnishd/cache_http.c

index 62f677553b509075c6222f907132dd06bd4db315..fa23181de0a9bddcd15af4cd3aeade809db57635 100644 (file)
@@ -33,7 +33,6 @@
 
 #include "config.h"
 
-#include <ctype.h>
 #include <errno.h>
 #include <unistd.h>
 #include <stdarg.h>
@@ -219,7 +218,7 @@ http_GetHdr(const struct http *hp, const char *hdr, char **ptr)
        }
        if (ptr != NULL) {
                p = hp->hd[u].b + l;
-               while (isspace(*p))
+               while (vct_issp(*p))
                        p++;
                *ptr = p;
        }
@@ -275,7 +274,9 @@ http_GetHdrField(const struct http *hp, const char *hdr, const char *field, char
        return (0);
 }
 
-/*--------------------------------------------------------------------*/
+/*--------------------------------------------------------------------
+ * XXX: redo with http_GetHdrField() ?
+ */
 
 const char *
 http_DoConnection(struct http *hp)
@@ -291,12 +292,12 @@ http_DoConnection(struct http *hp)
        }
        ret = NULL;
        for (; *p; p++) {
-               if (isspace(*p))
+               if (vct_issp(*p))
                        continue;
                if (*p == ',')
                        continue;
                for (q = p + 1; *q; q++)
-                       if (*q == ',' || isspace(*q))
+                       if (*q == ',' || vct_issp(*q))
                                break;
                u = pdiff(p, q);
                if (u == 5 && !strncasecmp(p, "close", u))