From: des Date: Tue, 24 Jul 2007 13:52:40 +0000 (+0000) Subject: Use strlen() directly. X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=943cdf06e5bd803ab4640d0d7ab2340ef3ae7635;p=varnish Use strlen() directly. git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@1749 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- diff --git a/varnish-cache/bin/varnishd/cache_http.c b/varnish-cache/bin/varnishd/cache_http.c index 23591d1d..fc3854f7 100644 --- a/varnish-cache/bin/varnishd/cache_http.c +++ b/varnish-cache/bin/varnishd/cache_http.c @@ -884,13 +884,11 @@ http_SetHeader(struct worker *w, int fd, struct http *to, const char *hdr) static void http_PutField(struct worker *w, int fd, struct http *to, int field, const char *string) { - const char *e; char *p; int l; CHECK_OBJ_NOTNULL(to, HTTP_MAGIC); - e = strchr(string, '\0'); - l = (e - string); + l = strlen(string); p = WS_Alloc(to->ws, l + 1); if (p == NULL) { WSL(w, SLT_LostHeader, fd, "%s", string);