]> err.no Git - varnish/commitdiff
Eliminate a & which I tend to forget every single time.
authorphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Mon, 1 Oct 2007 07:27:37 +0000 (07:27 +0000)
committerphk <phk@d4fa192b-c00b-0410-8231-f00ffab90ce4>
Mon, 1 Oct 2007 07:27:37 +0000 (07:27 +0000)
git-svn-id: svn+ssh://projects.linpro.no/svn/varnish/trunk@2071 d4fa192b-c00b-0410-8231-f00ffab90ce4

varnish-cache/bin/varnishd/cache.h
varnish-cache/bin/varnishd/cache_center.c
varnish-cache/bin/varnishd/cache_fetch.c
varnish-cache/bin/varnishd/cache_hash.c
varnish-cache/bin/varnishd/cache_response.c
varnish-cache/bin/varnishd/cache_synthetic.c
varnish-cache/bin/varnishd/cache_vary.c
varnish-cache/bin/varnishd/cache_vrt.c

index be8ab595a45ae35b7a7a0f2940536af94aa23de7..01086ae122b9ee331612ce4f6cd3d3f3dafbc7ce 100644 (file)
@@ -246,7 +246,7 @@ struct object {
 
        double                  last_modified;
 
-       struct http             http;
+       struct http             http[1];
        VTAILQ_ENTRY(object)    list;
 
        VTAILQ_ENTRY(object)    deathrow;
index e2e852e3a0fcb49c945cdb3599f0f250a640d5f8..589259013b889f353dc2b2ae8a5a59926617b747 100644 (file)
@@ -305,9 +305,9 @@ cnt_fetch(struct sess *sp)
        sp->bereq = NULL;
 
        if (!i)
-               RFC2616_cache_policy(sp, &sp->obj->http);       /* XXX -> VCL */
+               RFC2616_cache_policy(sp, sp->obj->http);        /* XXX -> VCL */
        else
-               http_PutStatus(sp->wrk, sp->fd, &sp->obj->http, 503);
+               http_PutStatus(sp->wrk, sp->fd, sp->obj->http, 503);
 
        VCL_fetch_method(sp);
 
index dcc05df40727bc423e925ac2ee9bfd4fcd78dd21..7fe52db04139921e7fc92522b5de39c2c3a35597 100644 (file)
@@ -309,7 +309,7 @@ Fetch(struct sess *sp)
                sp->obj->last_modified = TIM_parse(b);
 
        /* Filter into object */
-       hp2 = &sp->obj->http;
+       hp2 = sp->obj->http;
        len = Tlen(htc->rxbuf);
        len += 256;     /* XXX: margin for content-length etc */
 
index 66d3b0739e6e6cda884e1fabc40436a4a1ba392f..25cb7dd3d7ce06e6e09d052e3393154f5217b716 100644 (file)
@@ -87,7 +87,7 @@ HSH_Prealloc(const struct sess *sp)
                w->nobj = calloc(sizeof *w->nobj, 1);
                XXXAN(w->nobj);
                w->nobj->magic = OBJECT_MAGIC;
-               w->nobj->http.magic = HTTP_MAGIC;
+               w->nobj->http->magic = HTTP_MAGIC;
                w->nobj->busy = 1;
                w->nobj->refcnt = 1;
                VTAILQ_INIT(&w->nobj->store);
@@ -304,8 +304,8 @@ HSH_Deref(struct object *o)
        if (r != 0)
                return;
 
-       if (o->http.ws != NULL && o->http.ws->s != NULL)
-               free(o->http.ws->s);
+       if (o->http->ws != NULL && o->http->ws->s != NULL)
+               free(o->http->ws->s);
 
        if (o->vary != NULL)
                free(o->vary);
index 244d326d1d52c115966e33e996ffe8cbce44bcf4..f40710e981fda67df9a2cf78d11d55ca83b95fe5 100644 (file)
@@ -123,8 +123,8 @@ RES_BuildHttp(struct sess *sp)
 
        http_ClrHeader(sp->http);
        sp->http->logtag = HTTP_Tx;
-       http_CopyResp(sp->http, &sp->obj->http);
-       http_FilterFields(sp->wrk, sp->fd, sp->http, &sp->obj->http,
+       http_CopyResp(sp->http, sp->obj->http);
+       http_FilterFields(sp->wrk, sp->fd, sp->http, sp->obj->http,
            HTTPH_A_DELIVER);
        
        TIM_format(TIM_real(), time_str);
index bf267ed7f609dcd3b8c01b828f59368f2e187624..10d1b16aa73ec80a6ab1a64f653453ebc88a7f12 100644 (file)
@@ -60,14 +60,14 @@ SYN_ErrorPage(struct sess *sp, int status, const char *reason, int ttl)
        CHECK_OBJ_NOTNULL(sp, SESS_MAGIC);
        CHECK_OBJ_NOTNULL(sp->wrk, WORKER_MAGIC);
        CHECK_OBJ_NOTNULL(sp->obj, OBJECT_MAGIC);
-       CHECK_OBJ_NOTNULL(&sp->obj->http, HTTP_MAGIC);
+       CHECK_OBJ_NOTNULL(sp->obj->http, HTTP_MAGIC);
        assert(sp->obj->busy > 0);
 
        /* shortcuts */
        w = sp->wrk;
        fd = sp->fd;
        o = sp->obj;
-       h = &o->http;
+       h = o->http;
        now = TIM_real();
 
        /* look up HTTP response */
index a6b76f277f1f8bc65c718627eff2cfdd88c390d3..3db31a267b122dfe72fb8100d0342a1113fc18d5 100644 (file)
@@ -76,7 +76,7 @@ VRY_Create(const struct sess *sp)
        AN(sbh);
 
        /* No Vary: header, no worries */
-       if (!http_GetHdr(&sp->obj->http, H_Vary, &v))
+       if (!http_GetHdr(sp->obj->http, H_Vary, &v))
                return;
 
        for (p = v; *p; p++) {
index 23f55111bd1605e398aee9b49eaeae2a00ac1c10..a8244a665f80927854457f1b7b0fd48076ff206d 100644 (file)
@@ -91,7 +91,7 @@ vrt_selecthttp(const struct sess *sp, enum gethdr_e where)
                hp = sp->http;
                break;
        case HDR_OBJ:
-               hp = &sp->obj->http;
+               hp = sp->obj->http;
                break;
        default:
                INCOMPL();
@@ -215,8 +215,8 @@ VRT_DO_HDR(req,   proto,    sp->http,               HTTP_HDR_PROTO)
 VRT_DO_HDR(bereq, request,     sp->bereq->http,        HTTP_HDR_REQ)
 VRT_DO_HDR(bereq, url,         sp->bereq->http,        HTTP_HDR_URL)
 VRT_DO_HDR(bereq, proto,       sp->bereq->http,        HTTP_HDR_PROTO)
-VRT_DO_HDR(obj,   proto,       &sp->obj->http,         HTTP_HDR_PROTO)
-VRT_DO_HDR(obj,   response,    &sp->obj->http,         HTTP_HDR_RESPONSE)
+VRT_DO_HDR(obj,   proto,       sp->obj->http,          HTTP_HDR_PROTO)
+VRT_DO_HDR(obj,   response,    sp->obj->http,          HTTP_HDR_RESPONSE)
 VRT_DO_HDR(resp,  proto,       sp->http,               HTTP_HDR_PROTO)
 VRT_DO_HDR(resp,  response,    sp->http,               HTTP_HDR_RESPONSE)
 
@@ -226,12 +226,12 @@ VRT_l_obj_status(const struct sess *sp, int num)
        char *p;
 
        assert(num >= 100 && num <= 999);
-       p = WS_Alloc(sp->obj->http.ws, 4);
+       p = WS_Alloc(sp->obj->http->ws, 4);
        if (p == NULL)
                WSP(sp, SLT_LostHeader, "%s", "obj.status");
        else
                sprintf(p, "%d", num);
-       http_SetH(&sp->obj->http, HTTP_HDR_STATUS, p);
+       http_SetH(sp->obj->http, HTTP_HDR_STATUS, p);
 }
 
 int
@@ -240,9 +240,9 @@ VRT_r_obj_status(const struct sess *sp)
        CHECK_OBJ_NOTNULL(sp, SESS_MAGIC);
        CHECK_OBJ_NOTNULL(sp->obj, OBJECT_MAGIC);
        /* XXX: use http_GetStatus() */
-       if (sp->obj->http.status)
-               return (sp->obj->http.status);
-       return (atoi(sp->obj->http.hd[HTTP_HDR_STATUS].b));
+       if (sp->obj->http->status)
+               return (sp->obj->http->status);
+       return (atoi(sp->obj->http->hd[HTTP_HDR_STATUS].b));
 }
 
 void
@@ -374,7 +374,7 @@ VRT_r_resp_proto(const struct sess *sp)
 {
        CHECK_OBJ_NOTNULL(sp, SESS_MAGIC);
        CHECK_OBJ_NOTNULL(sp->obj, OBJECT_MAGIC);
-       return (sp->obj->http.hd[HTTP_HDR_PROTO].b);
+       return (sp->obj->http->hd[HTTP_HDR_PROTO].b);
 }
 
 const char *
@@ -382,7 +382,7 @@ VRT_r_resp_response(const struct sess *sp)
 {
        CHECK_OBJ_NOTNULL(sp, SESS_MAGIC);
        CHECK_OBJ_NOTNULL(sp->obj, OBJECT_MAGIC);
-       return (sp->obj->http.hd[HTTP_HDR_RESPONSE].b);
+       return (sp->obj->http->hd[HTTP_HDR_RESPONSE].b);
 }
 
 int
@@ -390,7 +390,7 @@ VRT_r_resp_status(const struct sess *sp)
 {
        CHECK_OBJ_NOTNULL(sp, SESS_MAGIC);
        CHECK_OBJ_NOTNULL(sp->obj, OBJECT_MAGIC);
-       return (atoi(sp->obj->http.hd[HTTP_HDR_STATUS].b));
+       return (atoi(sp->obj->http->hd[HTTP_HDR_STATUS].b));
 }
 
 /*--------------------------------------------------------------------*/