[4.1] 110a61e Minor OCD here and there
Lasse Karstensen
lkarsten at varnish-software.com
Tue Jun 14 12:00:16 CEST 2016
commit 110a61e9ed00ba59513e30f9ef8a7e9b2a4e5128
Author: Federico G. Schwindt <fgsch at lodoss.net>
Date: Tue May 24 09:12:16 2016 +0100
Minor OCD here and there
diff --git a/bin/varnishd/cache/cache_rfc2616.c b/bin/varnishd/cache/cache_rfc2616.c
index 650bcf5..cf89f75 100644
--- a/bin/varnishd/cache/cache_rfc2616.c
+++ b/bin/varnishd/cache/cache_rfc2616.c
@@ -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);
diff --git a/include/miniobj.h b/include/miniobj.h
index 95f3bef..901143f 100644
--- a/include/miniobj.h
+++ b/include/miniobj.h
@@ -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)); \
diff --git a/lib/libvmod_debug/vmod_debug.c b/lib/libvmod_debug/vmod_debug.c
index f16953b..cca54e8 100644
--- a/lib/libvmod_debug/vmod_debug.c
+++ b/lib/libvmod_debug/vmod_debug.c
@@ -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
More information about the varnish-commit
mailing list