Commit 110a61e9 authored by Federico G. Schwindt's avatar Federico G. Schwindt Committed by Lasse Karstensen

Minor OCD here and there

parent 17f14aad
......@@ -254,7 +254,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;
/*
......@@ -274,8 +274,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)); \
......
......@@ -350,9 +350,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);
}
}
......@@ -409,7 +409,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