From 943cdf06e5bd803ab4640d0d7ab2340ef3ae7635 Mon Sep 17 00:00:00 2001 From: des Date: Tue, 24 Jul 2007 13:52:40 +0000 Subject: [PATCH] Use strlen() directly. git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@1749 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- varnish-cache/bin/varnishd/cache_http.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) 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); -- 2.39.5