r2762 - trunk/varnish-cache/bin/varnishd
phk at projects.linpro.no
phk at projects.linpro.no
Sat Jun 21 22:56:14 CEST 2008
Author: phk
Date: 2008-06-21 22:56:14 +0200 (Sat, 21 Jun 2008)
New Revision: 2762
Modified:
trunk/varnish-cache/bin/varnishd/cache_http.c
Log:
Avoid <ctype.h> entirely
Modified: trunk/varnish-cache/bin/varnishd/cache_http.c
===================================================================
--- trunk/varnish-cache/bin/varnishd/cache_http.c 2008-06-21 20:51:58 UTC (rev 2761)
+++ trunk/varnish-cache/bin/varnishd/cache_http.c 2008-06-21 20:56:14 UTC (rev 2762)
@@ -33,7 +33,6 @@
#include "config.h"
-#include <ctype.h>
#include <errno.h>
#include <unistd.h>
#include <stdarg.h>
@@ -219,7 +218,7 @@
}
if (ptr != NULL) {
p = hp->hd[u].b + l;
- while (isspace(*p))
+ while (vct_issp(*p))
p++;
*ptr = p;
}
@@ -275,7 +274,9 @@
return (0);
}
-/*--------------------------------------------------------------------*/
+/*--------------------------------------------------------------------
+ * XXX: redo with http_GetHdrField() ?
+ */
const char *
http_DoConnection(struct http *hp)
@@ -291,12 +292,12 @@
}
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))
More information about the varnish-commit
mailing list