Commit a72bf08a authored by Poul-Henning Kamp's avatar Poul-Henning Kamp

Eliminate a & which I tend to forget every single time.


git-svn-id: http://www.varnish-cache.org/svn/trunk/varnish-cache@2071 d4fa192b-c00b-0410-8231-f00ffab90ce4
parent d98c4217
...@@ -246,7 +246,7 @@ struct object { ...@@ -246,7 +246,7 @@ struct object {
double last_modified; double last_modified;
struct http http; struct http http[1];
VTAILQ_ENTRY(object) list; VTAILQ_ENTRY(object) list;
VTAILQ_ENTRY(object) deathrow; VTAILQ_ENTRY(object) deathrow;
......
...@@ -305,9 +305,9 @@ cnt_fetch(struct sess *sp) ...@@ -305,9 +305,9 @@ cnt_fetch(struct sess *sp)
sp->bereq = NULL; sp->bereq = NULL;
if (!i) if (!i)
RFC2616_cache_policy(sp, &sp->obj->http); /* XXX -> VCL */ RFC2616_cache_policy(sp, sp->obj->http); /* XXX -> VCL */
else 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); VCL_fetch_method(sp);
......
...@@ -309,7 +309,7 @@ Fetch(struct sess *sp) ...@@ -309,7 +309,7 @@ Fetch(struct sess *sp)
sp->obj->last_modified = TIM_parse(b); sp->obj->last_modified = TIM_parse(b);
/* Filter into object */ /* Filter into object */
hp2 = &sp->obj->http; hp2 = sp->obj->http;
len = Tlen(htc->rxbuf); len = Tlen(htc->rxbuf);
len += 256; /* XXX: margin for content-length etc */ len += 256; /* XXX: margin for content-length etc */
......
...@@ -87,7 +87,7 @@ HSH_Prealloc(const struct sess *sp) ...@@ -87,7 +87,7 @@ HSH_Prealloc(const struct sess *sp)
w->nobj = calloc(sizeof *w->nobj, 1); w->nobj = calloc(sizeof *w->nobj, 1);
XXXAN(w->nobj); XXXAN(w->nobj);
w->nobj->magic = OBJECT_MAGIC; w->nobj->magic = OBJECT_MAGIC;
w->nobj->http.magic = HTTP_MAGIC; w->nobj->http->magic = HTTP_MAGIC;
w->nobj->busy = 1; w->nobj->busy = 1;
w->nobj->refcnt = 1; w->nobj->refcnt = 1;
VTAILQ_INIT(&w->nobj->store); VTAILQ_INIT(&w->nobj->store);
...@@ -304,8 +304,8 @@ HSH_Deref(struct object *o) ...@@ -304,8 +304,8 @@ HSH_Deref(struct object *o)
if (r != 0) if (r != 0)
return; return;
if (o->http.ws != NULL && o->http.ws->s != NULL) if (o->http->ws != NULL && o->http->ws->s != NULL)
free(o->http.ws->s); free(o->http->ws->s);
if (o->vary != NULL) if (o->vary != NULL)
free(o->vary); free(o->vary);
......
...@@ -123,8 +123,8 @@ RES_BuildHttp(struct sess *sp) ...@@ -123,8 +123,8 @@ RES_BuildHttp(struct sess *sp)
http_ClrHeader(sp->http); http_ClrHeader(sp->http);
sp->http->logtag = HTTP_Tx; sp->http->logtag = HTTP_Tx;
http_CopyResp(sp->http, &sp->obj->http); http_CopyResp(sp->http, sp->obj->http);
http_FilterFields(sp->wrk, sp->fd, sp->http, &sp->obj->http, http_FilterFields(sp->wrk, sp->fd, sp->http, sp->obj->http,
HTTPH_A_DELIVER); HTTPH_A_DELIVER);
TIM_format(TIM_real(), time_str); TIM_format(TIM_real(), time_str);
......
...@@ -60,14 +60,14 @@ SYN_ErrorPage(struct sess *sp, int status, const char *reason, int ttl) ...@@ -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, SESS_MAGIC);
CHECK_OBJ_NOTNULL(sp->wrk, WORKER_MAGIC); CHECK_OBJ_NOTNULL(sp->wrk, WORKER_MAGIC);
CHECK_OBJ_NOTNULL(sp->obj, OBJECT_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); assert(sp->obj->busy > 0);
/* shortcuts */ /* shortcuts */
w = sp->wrk; w = sp->wrk;
fd = sp->fd; fd = sp->fd;
o = sp->obj; o = sp->obj;
h = &o->http; h = o->http;
now = TIM_real(); now = TIM_real();
/* look up HTTP response */ /* look up HTTP response */
......
...@@ -76,7 +76,7 @@ VRY_Create(const struct sess *sp) ...@@ -76,7 +76,7 @@ VRY_Create(const struct sess *sp)
AN(sbh); AN(sbh);
/* No Vary: header, no worries */ /* No Vary: header, no worries */
if (!http_GetHdr(&sp->obj->http, H_Vary, &v)) if (!http_GetHdr(sp->obj->http, H_Vary, &v))
return; return;
for (p = v; *p; p++) { for (p = v; *p; p++) {
......
...@@ -91,7 +91,7 @@ vrt_selecthttp(const struct sess *sp, enum gethdr_e where) ...@@ -91,7 +91,7 @@ vrt_selecthttp(const struct sess *sp, enum gethdr_e where)
hp = sp->http; hp = sp->http;
break; break;
case HDR_OBJ: case HDR_OBJ:
hp = &sp->obj->http; hp = sp->obj->http;
break; break;
default: default:
INCOMPL(); INCOMPL();
...@@ -215,8 +215,8 @@ VRT_DO_HDR(req, proto, sp->http, HTTP_HDR_PROTO) ...@@ -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, request, sp->bereq->http, HTTP_HDR_REQ)
VRT_DO_HDR(bereq, url, sp->bereq->http, HTTP_HDR_URL) 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(bereq, proto, sp->bereq->http, HTTP_HDR_PROTO)
VRT_DO_HDR(obj, proto, &sp->obj->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, response, sp->obj->http, HTTP_HDR_RESPONSE)
VRT_DO_HDR(resp, proto, sp->http, HTTP_HDR_PROTO) VRT_DO_HDR(resp, proto, sp->http, HTTP_HDR_PROTO)
VRT_DO_HDR(resp, response, sp->http, HTTP_HDR_RESPONSE) VRT_DO_HDR(resp, response, sp->http, HTTP_HDR_RESPONSE)
...@@ -226,12 +226,12 @@ VRT_l_obj_status(const struct sess *sp, int num) ...@@ -226,12 +226,12 @@ VRT_l_obj_status(const struct sess *sp, int num)
char *p; char *p;
assert(num >= 100 && num <= 999); assert(num >= 100 && num <= 999);
p = WS_Alloc(sp->obj->http.ws, 4); p = WS_Alloc(sp->obj->http->ws, 4);
if (p == NULL) if (p == NULL)
WSP(sp, SLT_LostHeader, "%s", "obj.status"); WSP(sp, SLT_LostHeader, "%s", "obj.status");
else else
sprintf(p, "%d", num); sprintf(p, "%d", num);
http_SetH(&sp->obj->http, HTTP_HDR_STATUS, p); http_SetH(sp->obj->http, HTTP_HDR_STATUS, p);
} }
int int
...@@ -240,9 +240,9 @@ VRT_r_obj_status(const struct sess *sp) ...@@ -240,9 +240,9 @@ VRT_r_obj_status(const struct sess *sp)
CHECK_OBJ_NOTNULL(sp, SESS_MAGIC); CHECK_OBJ_NOTNULL(sp, SESS_MAGIC);
CHECK_OBJ_NOTNULL(sp->obj, OBJECT_MAGIC); CHECK_OBJ_NOTNULL(sp->obj, OBJECT_MAGIC);
/* XXX: use http_GetStatus() */ /* XXX: use http_GetStatus() */
if (sp->obj->http.status) if (sp->obj->http->status)
return (sp->obj->http.status); return (sp->obj->http->status);
return (atoi(sp->obj->http.hd[HTTP_HDR_STATUS].b)); return (atoi(sp->obj->http->hd[HTTP_HDR_STATUS].b));
} }
void void
...@@ -374,7 +374,7 @@ VRT_r_resp_proto(const struct sess *sp) ...@@ -374,7 +374,7 @@ VRT_r_resp_proto(const struct sess *sp)
{ {
CHECK_OBJ_NOTNULL(sp, SESS_MAGIC); CHECK_OBJ_NOTNULL(sp, SESS_MAGIC);
CHECK_OBJ_NOTNULL(sp->obj, OBJECT_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 * const char *
...@@ -382,7 +382,7 @@ VRT_r_resp_response(const struct sess *sp) ...@@ -382,7 +382,7 @@ VRT_r_resp_response(const struct sess *sp)
{ {
CHECK_OBJ_NOTNULL(sp, SESS_MAGIC); CHECK_OBJ_NOTNULL(sp, SESS_MAGIC);
CHECK_OBJ_NOTNULL(sp->obj, OBJECT_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 int
...@@ -390,7 +390,7 @@ VRT_r_resp_status(const struct sess *sp) ...@@ -390,7 +390,7 @@ VRT_r_resp_status(const struct sess *sp)
{ {
CHECK_OBJ_NOTNULL(sp, SESS_MAGIC); CHECK_OBJ_NOTNULL(sp, SESS_MAGIC);
CHECK_OBJ_NOTNULL(sp->obj, OBJECT_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));
} }
/*--------------------------------------------------------------------*/ /*--------------------------------------------------------------------*/
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment