From: phk Date: Tue, 3 Jul 2007 22:00:26 +0000 (+0000) Subject: Run FlexeLint to catch fluff. X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3ac74c8fdcd29f64e4596e71f8c276cbe369360b;p=varnish Run FlexeLint to catch fluff. git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@1639 d4fa192b-c00b-0410-8231-f00ffab90ce4 --- diff --git a/varnish-cache/bin/varnishd/cache.h b/varnish-cache/bin/varnishd/cache.h index 238a31c7..e3aea1b9 100644 --- a/varnish-cache/bin/varnishd/cache.h +++ b/varnish-cache/bin/varnishd/cache.h @@ -166,10 +166,6 @@ struct worker { struct srcaddr *srcaddr; struct acct acct; - /* Backend connection space */ - struct http bereq[1]; - struct http beresp[1]; - unsigned char *wlp, *wle; unsigned wlr; unsigned char wlog[WLOGSPACE]; @@ -407,8 +403,6 @@ const char *http_StatusMessage(int); void HTTP_Init(void); void http_ClrHeader(struct http *to); unsigned http_Write(struct worker *w, struct http *hp, int resp); -void http_GetReq(struct http *to, struct http *fm); -void http_CopyReq(struct http *to, struct http *fm); void http_CopyResp(struct http *to, struct http *fm); void http_SetResp(struct http *to, const char *proto, const char *status, const char *response); void http_FilterFields(struct worker *w, int fd, struct http *to, struct http *fm, unsigned how); diff --git a/varnish-cache/bin/varnishd/cache_http.c b/varnish-cache/bin/varnishd/cache_http.c index a731b425..24d02b11 100644 --- a/varnish-cache/bin/varnishd/cache_http.c +++ b/varnish-cache/bin/varnishd/cache_http.c @@ -702,8 +702,8 @@ http_copyh(struct http *to, struct http *fm, unsigned n) to->hdf[n] = fm->hdf[n]; } -void -http_GetReq(struct http *to, struct http *fm) +static void +http_getreq(struct http *to, struct http *fm) { CHECK_OBJ_NOTNULL(fm, HTTP_MAGIC); @@ -713,21 +713,6 @@ http_GetReq(struct http *to, struct http *fm) http_seth(to, HTTP_HDR_PROTO, "HTTP/1.1"); } -void -http_CopyReq(struct http *to, struct http *fm) -{ - - CHECK_OBJ_NOTNULL(fm, HTTP_MAGIC); - CHECK_OBJ_NOTNULL(to, HTTP_MAGIC); - http_copyh(to, fm, HTTP_HDR_REQ); - http_copyh(to, fm, HTTP_HDR_URL); - if (params->backend_http11) - http_seth(to, HTTP_HDR_PROTO, "HTTP/1.1"); - else - http_copyh(to, fm, HTTP_HDR_PROTO); -} - - void http_CopyResp(struct http *to, struct http *fm) { @@ -806,7 +791,7 @@ http_FilterHeader(struct sess *sp, unsigned how) hp = bereq->http; hp->logtag = HTTP_Tx; - http_GetReq(hp, sp->http); + http_getreq(hp, sp->http); http_FilterFields(sp->wrk, sp->fd, hp, sp->http, how); http_PrintfHeader(sp->wrk, sp->fd, hp, "X-Varnish: %u", sp->xid); http_PrintfHeader(sp->wrk, sp->fd, hp, diff --git a/varnish-cache/bin/varnishd/flint.lnt b/varnish-cache/bin/varnishd/flint.lnt index e024d2d6..1bc61767 100644 --- a/varnish-cache/bin/varnishd/flint.lnt +++ b/varnish-cache/bin/varnishd/flint.lnt @@ -41,8 +41,8 @@ // cache_center.c -efunc(525, CNT_Session) // Negative indentation from line --efunc(525, http_FilterHeader) // Negative indentation from line --efunc(539, http_FilterHeader) // Positive indentation from line +-efunc(525, http_FilterFields) // Negative indentation from line +-efunc(539, http_FilterFields) // Positive indentation from line // cache_vcl.c -efunc(525, vcl_handlingname) // Negative indentation from line