Commit c5d810e5 authored by Federico G. Schwindt's avatar Federico G. Schwindt

Minor OCD here and there

parent 7e90a2b4
......@@ -256,7 +256,7 @@ rfc2616_weak_compare(const char *p, const char *e)
int
RFC2616_Do_Cond(const struct req *req)
{
const char *p, *e, *l;
const char *p, *e;
double ims, lm;
/*
......@@ -276,8 +276,8 @@ RFC2616_Do_Cond(const struct req *req)
ims = VTIM_parse(p);
if (!ims || ims > req->t_req) /* [RFC7232 3.3 p16] */
return (0);
if (http_GetHdr(req->resp, H_Last_Modified, &l)) {
lm = VTIM_parse(l);
if (http_GetHdr(req->resp, H_Last_Modified, &p)) {
lm = VTIM_parse(p);
if (!lm || lm > ims)
return (0);
return (1);
......
......@@ -55,13 +55,13 @@
#define CAST_OBJ_NOTNULL(to, from, type_magic) \
do { \
(to) = (from); \
assert((to) != NULL); \
AN((to)); \
CHECK_OBJ((to), (type_magic)); \
} while (0)
#define TAKE_OBJ_NOTNULL(to, pfrom, type_magic) \
#define TAKE_OBJ_NOTNULL(to, pfrom, type_magic) \
do { \
assert((pfrom) != NULL); \
AN((pfrom)); \
(to) = *(pfrom); \
*(pfrom) = NULL; \
CHECK_OBJ_NOTNULL((to), (type_magic)); \
......
......@@ -352,9 +352,9 @@ event_function(VRT_CTX, struct vmod_priv *priv, enum vcl_event_e e)
{
switch (e) {
case VCL_EVENT_LOAD: return event_load(ctx, priv);
case VCL_EVENT_WARM: return event_warm(ctx, priv);
case VCL_EVENT_COLD: return event_cold(ctx, priv);
case VCL_EVENT_LOAD: return (event_load(ctx, priv));
case VCL_EVENT_WARM: return (event_warm(ctx, priv));
case VCL_EVENT_COLD: return (event_cold(ctx, priv));
default: return (0);
}
}
......@@ -411,7 +411,7 @@ vmod_workspace_free(VRT_CTX, VCL_ENUM which)
WS_Assert(ws);
AZ(ws->r);
return pdiff(ws->f, ws->e);
return (pdiff(ws->f, ws->e));
}
VCL_BOOL
......
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