[master] c40d55571 re-apply tools/coccinelle/return.cocci

Nils Goroll nils.goroll at uplex.de
Wed Feb 10 09:06:08 UTC 2021


commit c40d555710336c78436e3da300936f4fcf6bce4e
Author: Nils Goroll <nils.goroll at uplex.de>
Date:   Wed Feb 10 09:34:57 2021 +0100

    re-apply tools/coccinelle/return.cocci
    
    with manual polish for cstyle and un-doing some return ((x)).

diff --git a/bin/varnishd/cache/cache_backend.c b/bin/varnishd/cache/cache_backend.c
index 1d29817c9..4c5255d37 100644
--- a/bin/varnishd/cache/cache_backend.c
+++ b/bin/varnishd/cache/cache_backend.c
@@ -509,7 +509,7 @@ vbe_healthy(VRT_CTX, VCL_BACKEND d, VCL_TIME *t)
 	if (t != NULL)
 		*t = bp->changed;
 
-	return (! bp->sick);
+	return (!bp->sick);
 }
 
 
diff --git a/bin/varnishd/cache/cache_ban_build.c b/bin/varnishd/cache/cache_ban_build.c
index 5f479504c..1d6e3d06a 100644
--- a/bin/varnishd/cache/cache_ban_build.c
+++ b/bin/varnishd/cache/cache_ban_build.c
@@ -258,8 +258,7 @@ BAN_AddTest(struct ban_proto *bp,
 	    ((1U << BAN_OPERIDX(op)) & arg_opervalid[BAN_ARGIDX(pv->tag)]) == 0)
 		return (ban_error(bp,
 		    "expected conditional (%s) got \"%s\"",
-		    arg_operhelp[BAN_ARGIDX(pv->tag)],
-		    a2));
+		    arg_operhelp[BAN_ARGIDX(pv->tag)], a2));
 
 	if ((pv->flag & BANS_FLAG_DURATION) == 0) {
 		assert(! BANS_HAS_ARG2_DOUBLE(pv->tag));
diff --git a/bin/varnishd/cache/cache_esi_deliver.c b/bin/varnishd/cache/cache_esi_deliver.c
index 87cb9d03d..68ae73268 100644
--- a/bin/varnishd/cache/cache_esi_deliver.c
+++ b/bin/varnishd/cache/cache_esi_deliver.c
@@ -668,7 +668,7 @@ ved_gzgz_bytes(struct vdp_ctx *vdx, enum vdp_action act, void **priv,
 			if (dl > len)
 				dl = len;
 			if (ved_bytes(foo->ecx, act, pp, dl))
-				return(-1);
+				return (-1);
 			foo->ll += dl;
 			len -= dl;
 			pp += dl;
diff --git a/bin/varnishd/cache/cache_expire.c b/bin/varnishd/cache/cache_expire.c
index ae9cb2314..a415fce59 100644
--- a/bin/varnishd/cache/cache_expire.c
+++ b/bin/varnishd/cache/cache_expire.c
@@ -324,7 +324,7 @@ exp_expire(struct exp_priv *ep, vtim_real now)
 
 	oc = VBH_root(ep->heap);
 	if (oc == NULL)
-		return (now + 355./113.);
+		return (now + 355. / 113.);
 	VSLb(&ep->vsl, SLT_ExpKill, "EXP_expire p=%p e=%.6f f=0x%x", oc,
 	    oc->timer_when - now, oc->flags);
 
diff --git a/bin/varnishd/cache/cache_gzip.c b/bin/varnishd/cache/cache_gzip.c
index 7e98ff4d9..e4d23de51 100644
--- a/bin/varnishd/cache/cache_gzip.c
+++ b/bin/varnishd/cache/cache_gzip.c
@@ -560,7 +560,7 @@ vfp_gunzip_pull(struct vfp_ctx *vc, struct vfp_entry *vfe, void *p,
 		if (!VGZ_IbufEmpty(vg) || vp == VFP_END) {
 			vr = VGZ_Gunzip(vg, &dp, &dl);
 			if (vr == VGZ_END && !VGZ_IbufEmpty(vg))
-				return(VFP_Error(vc, "Junk after gzip data"));
+				return (VFP_Error(vc, "Junk after gzip data"));
 			if (vr < VGZ_OK)
 				return (VFP_Error(vc,
 				    "Invalid Gzip data: %s", vgz_msg(vg)));
@@ -573,7 +573,7 @@ vfp_gunzip_pull(struct vfp_ctx *vc, struct vfp_entry *vfe, void *p,
 		AN(VGZ_IbufEmpty(vg));
 	} while (vp == VFP_OK);
 	if (vr != VGZ_END)
-		return(VFP_Error(vc, "Gunzip error at the very end"));
+		return (VFP_Error(vc, "Gunzip error at the very end"));
 	return (vp);
 }
 
@@ -664,7 +664,7 @@ vfp_testgunzip_pull(struct vfp_ctx *vc, struct vfp_entry *vfe, void *p,
 			VGZ_Obuf(vg, vg->m_buf, vg->m_sz);
 			vr = VGZ_Gunzip(vg, &dp, &dl);
 			if (vr == VGZ_END && !VGZ_IbufEmpty(vg))
-				return(VFP_Error(vc, "Junk after gzip data"));
+				return (VFP_Error(vc, "Junk after gzip data"));
 			if (vr < VGZ_OK)
 				return (VFP_Error(vc,
 				    "Invalid Gzip data: %s", vgz_msg(vg)));
diff --git a/bin/varnishd/cache/cache_req_fsm.c b/bin/varnishd/cache/cache_req_fsm.c
index f7d378a78..9b5a4b8a5 100644
--- a/bin/varnishd/cache/cache_req_fsm.c
+++ b/bin/varnishd/cache/cache_req_fsm.c
@@ -171,7 +171,7 @@ Resp_Setup_Deliver(struct req *req)
 	    ObjCheckFlag(req->wrk, oc, OF_GZIPED) &&
 	    !RFC2616_Req_Gzip(req->http))
 		RFC2616_Weaken_Etag(h);
-	return(0);
+	return (0);
 }
 
 void
diff --git a/bin/varnishd/cache/cache_vrt.c b/bin/varnishd/cache/cache_vrt.c
index d674b728a..0a729c0e4 100644
--- a/bin/varnishd/cache/cache_vrt.c
+++ b/bin/varnishd/cache/cache_vrt.c
@@ -1037,7 +1037,7 @@ VRT_ipcmp(VRT_CTX, VCL_IP sua1, VCL_IP sua2)
 
 	if (sua1 == NULL || sua2 == NULL) {
 		VRT_fail(ctx, "%s: Illegal IP", __func__);
-		return(1);
+		return (1);
 	}
 	return (VSA_Compare_IP(sua1, sua2));
 }
diff --git a/bin/varnishd/cache/cache_vrt_vcl.c b/bin/varnishd/cache/cache_vrt_vcl.c
index b7ecdd7ff..023ba0022 100644
--- a/bin/varnishd/cache/cache_vrt_vcl.c
+++ b/bin/varnishd/cache/cache_vrt_vcl.c
@@ -358,7 +358,7 @@ VRT_VCL_Prevent_Cold(VRT_CTX, const char *desc)
 	VTAILQ_INSERT_TAIL(&ctx->vcl->ref_list, ref, list);
 	Lck_Unlock(&vcl_mtx);
 
-	return(ref);
+	return (ref);
 }
 
 void
diff --git a/bin/varnishd/mgt/mgt_acceptor.c b/bin/varnishd/mgt/mgt_acceptor.c
index dd00d77bc..1af17f365 100644
--- a/bin/varnishd/mgt/mgt_acceptor.c
+++ b/bin/varnishd/mgt/mgt_acceptor.c
@@ -191,7 +191,7 @@ mac_tcp(void *priv, const struct suckaddr *sa)
 	}
 	ls = mk_listen_sock(la, sa);
 	if (ls == NULL)
-		return(0);
+		return (0);
 	AZ(ls->uds);
 	if (VSA_Port(ls->addr) == 0) {
 		/*
@@ -226,7 +226,7 @@ mac_uds(void *priv, const struct sockaddr_un *uds)
 	}
 	ls = mk_listen_sock(la, bogo_ip);
 	if (ls == NULL)
-		return(0);
+		return (0);
 	AN(ls->uds);
 	VTAILQ_INSERT_TAIL(&la->socks, ls, arglist);
 	VTAILQ_INSERT_TAIL(&heritage.socks, ls, list);
diff --git a/bin/varnishd/mgt/mgt_child.c b/bin/varnishd/mgt/mgt_child.c
index 6be347d92..e55e6ca5d 100644
--- a/bin/varnishd/mgt/mgt_child.c
+++ b/bin/varnishd/mgt/mgt_child.c
@@ -283,7 +283,7 @@ child_poker(const struct vev *e, int what)
 			MCH_Cli_Fail();
 	}
 	free(r);
-	return 0;
+	return (0);
 }
 
 /*=====================================================================
diff --git a/bin/varnishd/mgt/mgt_cli.c b/bin/varnishd/mgt/mgt_cli.c
index 18b6202b2..11cff7889 100644
--- a/bin/varnishd/mgt/mgt_cli.c
+++ b/bin/varnishd/mgt/mgt_cli.c
@@ -576,7 +576,7 @@ Marg_closer(void *priv)
 
 	(void)priv;
 	M_fd = -1;
-	return(0);
+	return (0);
 }
 
 static int v_matchproto_(vev_cb_f)
@@ -651,7 +651,7 @@ marg_cb(void *priv, const struct suckaddr *sa)
 	AN(ma);
 	ma->sa = VSA_Clone(sa);
 	VTAILQ_INSERT_TAIL(&m_addr_list, ma, list);
-	return(0);
+	return (0);
 }
 
 void
diff --git a/bin/varnishd/mgt/mgt_param_bits.c b/bin/varnishd/mgt/mgt_param_bits.c
index 756db4159..d6a9c3fd2 100644
--- a/bin/varnishd/mgt/mgt_param_bits.c
+++ b/bin/varnishd/mgt/mgt_param_bits.c
@@ -141,8 +141,7 @@ tweak_vsl_mask(struct vsb *vsb, const struct parspec *par, const char *arg)
 			(void)bit(mgt_param.vsl_mask, SLT_ExpKill, BSET);
 		} else {
 			return (bit_tweak(vsb, mgt_param.vsl_mask,
-			    SLT__Reserved, arg, VSL_tags,
-			    "VSL tag", "-"));
+			    SLT__Reserved, arg, VSL_tags, "VSL tag", "-"));
 		}
 	} else {
 		if (arg == JSON_FMT)
diff --git a/bin/varnishd/mgt/mgt_param_tweak.c b/bin/varnishd/mgt/mgt_param_tweak.c
index 8e378df04..b6d97797b 100644
--- a/bin/varnishd/mgt/mgt_param_tweak.c
+++ b/bin/varnishd/mgt/mgt_param_tweak.c
@@ -115,8 +115,7 @@ tweak_double(struct vsb *vsb, const struct parspec *par, const char *arg)
 	volatile double *dest;
 
 	dest = par->priv;
-	return (tweak_generic_double(vsb, dest, arg,
-	    par->min, par->max, "%g"));
+	return (tweak_generic_double(vsb, dest, arg, par->min, par->max, "%g"));
 }
 
 /*--------------------------------------------------------------------*/
diff --git a/bin/varnishd/mgt/mgt_vcl.c b/bin/varnishd/mgt/mgt_vcl.c
index 3e978661b..c6c78de21 100644
--- a/bin/varnishd/mgt/mgt_vcl.c
+++ b/bin/varnishd/mgt/mgt_vcl.c
@@ -921,7 +921,7 @@ mcf_vcl_check_dag(struct cli *cli, struct vclprog *tree, struct vclprog *target)
 			    tree->name, vd->to->name);
 		return (1);
 	}
-	return(0);
+	return (0);
 }
 
 static void v_matchproto_(cli_func_t)
diff --git a/bin/varnishd/waiter/cache_waiter_epoll.c b/bin/varnishd/waiter/cache_waiter_epoll.c
index 53fa4be3b..b53e48e15 100644
--- a/bin/varnishd/waiter/cache_waiter_epoll.c
+++ b/bin/varnishd/waiter/cache_waiter_epoll.c
@@ -177,7 +177,7 @@ vwe_enter(void *priv, struct waited *wp)
 	if (Wait_When(wp) < vwe->next)
 		assert(write(vwe->pipe[1], "X", 1) == 1);
 	Lck_Unlock(&vwe->mtx);
-	return(0);
+	return (0);
 }
 
 /*--------------------------------------------------------------------*/
diff --git a/bin/varnishd/waiter/cache_waiter_kqueue.c b/bin/varnishd/waiter/cache_waiter_kqueue.c
index 33429b19b..27ff1cca6 100644
--- a/bin/varnishd/waiter/cache_waiter_kqueue.c
+++ b/bin/varnishd/waiter/cache_waiter_kqueue.c
@@ -156,7 +156,7 @@ vwk_enter(void *priv, struct waited *wp)
 		assert(write(vwk->pipe[1], "X", 1) == 1);
 
 	Lck_Unlock(&vwk->mtx);
-	return(0);
+	return (0);
 }
 
 /*--------------------------------------------------------------------*/
diff --git a/bin/varnishtest/vtc_client.c b/bin/varnishtest/vtc_client.c
index 3ef81a0a8..178aa1335 100644
--- a/bin/varnishtest/vtc_client.c
+++ b/bin/varnishtest/vtc_client.c
@@ -141,7 +141,7 @@ uds_open(void *priv, const struct sockaddr_un *uds)
 	VTCP_nonblocking(s);
 	i = connect(s, (const void*)uds, sl);
 	if (i == 0)
-		return(s);
+		return (s);
 	if (errno != EINPROGRESS) {
 		closefd(&s);
 		return (-1);
diff --git a/bin/varnishtest/vtc_haproxy.c b/bin/varnishtest/vtc_haproxy.c
index c345ef42d..89be37b43 100644
--- a/bin/varnishtest/vtc_haproxy.c
+++ b/bin/varnishtest/vtc_haproxy.c
@@ -541,7 +541,7 @@ haproxy_create_mcli(struct haproxy *h)
 	macro_def(h->vl, buf, "addr", "%s", addr);
 	macro_def(h->vl, buf, "port", "%s", port);
 
-	return sock;
+	return (sock);
 }
 
 static void
diff --git a/bin/varnishtest/vtc_misc.c b/bin/varnishtest/vtc_misc.c
index 75a4b7c38..be7236b7e 100644
--- a/bin/varnishtest/vtc_misc.c
+++ b/bin/varnishtest/vtc_misc.c
@@ -384,7 +384,7 @@ ipvx_works(const char *target)
 		VTCP_close(&fd);
 		return (1);
 	}
-	return(0);
+	return (0);
 }
 
 /* SECTION: feature feature
diff --git a/lib/libvarnish/vrnd.c b/lib/libvarnish/vrnd.c
index 891c40f27..8e189f771 100644
--- a/lib/libvarnish/vrnd.c
+++ b/lib/libvarnish/vrnd.c
@@ -159,8 +159,8 @@ double
 VRND_RandomTestableDouble(void)
 {
 	return (
-		ldexp((double)VRND_RandomTestable(), -31) +
-		ldexp((double)VRND_RandomTestable(), -62)
+	    ldexp((double)VRND_RandomTestable(), -31) +
+	    ldexp((double)VRND_RandomTestable(), -62)
 	);
 }
 
diff --git a/lib/libvarnish/vtcp.c b/lib/libvarnish/vtcp.c
index 1c4996b21..087938bef 100644
--- a/lib/libvarnish/vtcp.c
+++ b/lib/libvarnish/vtcp.c
@@ -194,8 +194,7 @@ VTCP_filter_http(int sock)
 int
 VTCP_fastopen(int sock, int depth)
 {
-	return (setsockopt(sock, SOL_TCP, TCP_FASTOPEN,
-	    &depth, sizeof depth));
+	return (setsockopt(sock, SOL_TCP, TCP_FASTOPEN, &depth, sizeof depth));
 }
 
 #else
diff --git a/lib/libvarnishapi/vsl_arg.c b/lib/libvarnishapi/vsl_arg.c
index 0ec414164..4a8ee9a06 100644
--- a/lib/libvarnishapi/vsl_arg.c
+++ b/lib/libvarnishapi/vsl_arg.c
@@ -335,8 +335,7 @@ vsl_R_arg(struct VSL_data *vsl, const char *arg)
 	strcat(buf, p);
 	vsl->R_opt_p = VNUM_duration(buf);
 	if (isnan(vsl->R_opt_p) || vsl->R_opt_p <= 0.0)
-		return (vsl_diag(vsl,
-			"-R: Syntax error: Invalid duration"));
+		return (vsl_diag(vsl, "-R: Syntax error: Invalid duration"));
 	return (1);
 }
 
diff --git a/lib/libvarnishapi/vsm.c b/lib/libvarnishapi/vsm.c
index d9e67ef32..401f278dd 100644
--- a/lib/libvarnishapi/vsm.c
+++ b/lib/libvarnishapi/vsm.c
@@ -516,7 +516,7 @@ vsm_vlu_plus(struct vsm *vd, struct vsm_set *vs, const char *line)
 		(void)(vsm_diag(vd, "vsm_vlu_plus: bad index (%d/%s)",
 		    ac, av[0]));
 		VAV_Free(av);
-		return(-1);
+		return (-1);
 	}
 
 	vg = vs->vg;
@@ -564,7 +564,7 @@ vsm_vlu_minus(struct vsm *vd, const struct vsm_set *vs, const char *line)
 		(void)(vsm_diag(vd, "vsm_vlu_minus: bad index (%d/%s)",
 		    ac, av[0]));
 		VAV_Free(av);
-		return(-1);
+		return (-1);
 	}
 
 	/* Clustered segments cannot come before their cluster */
@@ -683,7 +683,7 @@ vsm_refresh_set(struct vsm *vd, struct vsm_set *vs)
 		vs->vg = VTAILQ_FIRST(&vs->segs);
 		vs->fd = openat(vs->dfd, "_.index", O_RDONLY);
 		if (vs->fd < 0)
-			return (vs->retval|vs->flag_restarted);
+			return (vs->retval | vs->flag_restarted);
 		VLU_Reset(vs->vlu);
 		AZ(fstat(vs->fd, &vs->fst));
 		vsm_readlines(vs);
diff --git a/lib/libvcc/vcc_symb.c b/lib/libvcc/vcc_symb.c
index 872a8bd47..59c74228f 100644
--- a/lib/libvcc/vcc_symb.c
+++ b/lib/libvcc/vcc_symb.c
@@ -232,17 +232,17 @@ vcc_sym_in_tab(struct vcc *tl, struct symtab *st,
 	}
 	pst = st->parent;
 	if (pst == NULL)
-		return(sym);
+		return (sym);
 	psym = VTAILQ_FIRST(&pst->symbols);
 	if (psym == NULL)
-		return(sym);
+		return (sym);
 	if (psym->wildcard == NULL)
-		return(sym);
+		return (sym);
 
 	sym = vcc_new_symbol(tl, st, kind, vlo, vhi);
 	psym->wildcard(tl, psym, sym);
 	if (tl->err)
-		return(NULL);
+		return (NULL);
 	return (sym);
 }
 
diff --git a/lib/libvgz/adler32.c b/lib/libvgz/adler32.c
index 5f5e0decd..436252be4 100644
--- a/lib/libvgz/adler32.c
+++ b/lib/libvgz/adler32.c
@@ -137,7 +137,7 @@ uLong ZEXPORT adler32(adler, buf, len)
     const Bytef *buf;
     uInt len;
 {
-    return adler32_z(adler, buf, len);
+    return (adler32_z(adler, buf, len));
 }
 
 /* ========================================================================= */
@@ -152,7 +152,7 @@ local uLong adler32_combine_(adler1, adler2, len2)
 
     /* for negative len, return invalid adler32 as a clue for debugging */
     if (len2 < 0)
-        return 0xffffffffUL;
+        return (0xffffffffUL);
 
     /* the derivation of this formula is left as an exercise for the reader */
     MOD63(len2);                /* assumes len2 >= 0 */
@@ -166,7 +166,7 @@ local uLong adler32_combine_(adler1, adler2, len2)
     if (sum1 >= BASE) sum1 -= BASE;
     if (sum2 >= ((unsigned long)BASE << 1)) sum2 -= ((unsigned long)BASE << 1);
     if (sum2 >= BASE) sum2 -= BASE;
-    return sum1 | (sum2 << 16);
+    return (sum1 | (sum2 << 16));
 }
 
 /* ========================================================================= */
@@ -175,7 +175,7 @@ uLong ZEXPORT adler32_combine(adler1, adler2, len2)
     uLong adler2;
     z_off_t len2;
 {
-    return adler32_combine_(adler1, adler2, len2);
+    return (adler32_combine_(adler1, adler2, len2));
 }
 
 uLong ZEXPORT adler32_combine64(adler1, adler2, len2)
@@ -183,7 +183,7 @@ uLong ZEXPORT adler32_combine64(adler1, adler2, len2)
     uLong adler2;
     z_off64_t len2;
 {
-    return adler32_combine_(adler1, adler2, len2);
+    return (adler32_combine_(adler1, adler2, len2));
 }
 #else
 uLong ZEXPORT adler32(adler, buf, len)
diff --git a/lib/libvgz/crc32.c b/lib/libvgz/crc32.c
index 9580440c0..9ec56fc34 100644
--- a/lib/libvgz/crc32.c
+++ b/lib/libvgz/crc32.c
@@ -191,7 +191,7 @@ const z_crc_t FAR * ZEXPORT get_crc_table()
     if (crc_table_empty)
         make_crc_table();
 #endif /* DYNAMIC_CRC_TABLE */
-    return (const z_crc_t FAR *)crc_table;
+    return ((const z_crc_t FAR *)crc_table);
 }
 
 /* ========================================================================= */
@@ -204,7 +204,7 @@ unsigned long ZEXPORT crc32_z(crc, buf, len)
     const unsigned char FAR *buf;
     z_size_t len;
 {
-    if (buf == Z_NULL) return 0UL;
+    if (buf == Z_NULL) return (0UL);
 
 #ifdef DYNAMIC_CRC_TABLE
     if (crc_table_empty)
@@ -217,9 +217,9 @@ unsigned long ZEXPORT crc32_z(crc, buf, len)
 
         endian = 1;
         if (*((unsigned char *)(&endian)))
-            return crc32_little(crc, buf, len);
+            return (crc32_little(crc, buf, len));
         else
-            return crc32_big(crc, buf, len);
+            return (crc32_big(crc, buf, len));
     }
 #endif /* BYFOUR */
     crc = crc ^ 0xffffffffUL;
@@ -230,7 +230,7 @@ unsigned long ZEXPORT crc32_z(crc, buf, len)
     if (len) do {
         DO1;
     } while (--len);
-    return crc ^ 0xffffffffUL;
+    return (crc ^ 0xffffffffUL);
 }
 
 /* ========================================================================= */
@@ -239,7 +239,7 @@ unsigned long ZEXPORT crc32(crc, buf, len)
     const unsigned char FAR *buf;
     uInt len;
 {
-    return crc32_z(crc, buf, len);
+    return (crc32_z(crc, buf, len));
 }
 
 #ifdef BYFOUR
@@ -381,7 +381,7 @@ local uLong crc32_combine_(crc1, crc2, len2)
 
     /* degenerate case (also disallow negative lengths) */
     if (len2 <= 0)
-        return crc1;
+        return (crc1);
 
     /* put operator for one zero bit in odd */
     odd[0] = 0xedb88320UL;          /* CRC-32 polynomial */
@@ -421,7 +421,7 @@ local uLong crc32_combine_(crc1, crc2, len2)
 
     /* return combined crc */
     crc1 ^= crc2;
-    return crc1;
+    return (crc1);
 }
 
 /* ========================================================================= */
@@ -430,7 +430,7 @@ uLong ZEXPORT crc32_combine(crc1, crc2, len2)
     uLong crc2;
     z_off_t len2;
 {
-    return crc32_combine_(crc1, crc2, len2);
+    return (crc32_combine_(crc1, crc2, len2));
 }
 
 uLong ZEXPORT crc32_combine64(crc1, crc2, len2)
@@ -438,5 +438,5 @@ uLong ZEXPORT crc32_combine64(crc1, crc2, len2)
     uLong crc2;
     z_off64_t len2;
 {
-    return crc32_combine_(crc1, crc2, len2);
+    return (crc32_combine_(crc1, crc2, len2));
 }
diff --git a/lib/libvgz/inflate.c b/lib/libvgz/inflate.c
index ca7b6086d..93730905a 100644
--- a/lib/libvgz/inflate.c
+++ b/lib/libvgz/inflate.c
@@ -246,7 +246,7 @@ z_streamp strm;
 const char *version;
 int stream_size;
 {
-    return inflateInit2_(strm, DEF_WBITS, version, stream_size);
+    return (inflateInit2_(strm, DEF_WBITS, version, stream_size));
 }
 
 int ZEXPORT inflatePrime(strm, bits, value)
diff --git a/lib/libvgz/trees.c b/lib/libvgz/trees.c
index a11cd0d48..a08b09da3 100644
--- a/lib/libvgz/trees.c
+++ b/lib/libvgz/trees.c
@@ -823,7 +823,7 @@ local int build_bl_tree(s)
     Tracev((stderr, "\ndyn trees: dyn %ld, stat %ld",
             s->opt_len, s->static_len));
 
-    return max_blindex;
+    return (max_blindex);
 }
 
 /* ===========================================================================
@@ -1062,10 +1062,10 @@ int ZLIB_INTERNAL _tr_tally (s, dist, lc)
         Tracev((stderr,"\nlast_lit %u, in %ld, out ~%ld(%ld%%) ",
                s->last_lit, in_length, out_length,
                100L - out_length*100L/in_length));
-        if (s->matches < s->last_lit/2 && out_length < in_length/2) return 1;
+        if (s->matches < s->last_lit/2 && out_length < in_length/2) return (1);
     }
 #endif
-    return (s->last_lit == s->lit_bufsize-1);
+    return (s->last_lit == s->lit_bufsize - 1);
     /* We avoid equality with lit_bufsize because of wraparound at 64K
      * on 16 bit machines and because stored blocks are restricted to
      * 64K-1 bytes.
@@ -1148,20 +1148,20 @@ local int detect_data_type(s)
     /* Check for non-textual ("black-listed") bytes. */
     for (n = 0; n <= 31; n++, black_mask >>= 1)
         if ((black_mask & 1) && (s->dyn_ltree[n].Freq != 0))
-            return Z_BINARY;
+            return (Z_BINARY);
 
     /* Check for textual ("white-listed") bytes. */
     if (s->dyn_ltree[9].Freq != 0 || s->dyn_ltree[10].Freq != 0
             || s->dyn_ltree[13].Freq != 0)
-        return Z_TEXT;
+        return (Z_TEXT);
     for (n = 32; n < LITERALS; n++)
         if (s->dyn_ltree[n].Freq != 0)
-            return Z_TEXT;
+            return (Z_TEXT);
 
     /* There are no "black-listed" or "white-listed" bytes:
      * this stream either is empty or has tolerated ("gray-listed") bytes only.
      */
-    return Z_BINARY;
+    return (Z_BINARY);
 }
 
 /* ===========================================================================
diff --git a/lib/libvgz/zutil.c b/lib/libvgz/zutil.c
index 5b21eceda..e65fd04b8 100644
--- a/lib/libvgz/zutil.c
+++ b/lib/libvgz/zutil.c
@@ -27,7 +27,7 @@ z_const char * const z_errmsg[10] = {
 
 const char * ZEXPORT zlibVersion()
 {
-    return ZLIB_VERSION;
+    return (ZLIB_VERSION);
 }
 
 uLong ZEXPORT zlibCompileFlags()
@@ -110,7 +110,7 @@ uLong ZEXPORT zlibCompileFlags()
 #    endif
 #  endif
 #endif
-    return flags;
+    return (flags);
 }
 
 #ifdef ZLIB_DEBUG
@@ -134,7 +134,7 @@ void ZLIB_INTERNAL z_error (m)
 const char * ZEXPORT zError(err)
     int err;
 {
-    return ERR_MSG(err);
+    return (ERR_MSG(err));
 }
 
 #if defined(_WIN32_WCE)
@@ -166,9 +166,9 @@ int ZLIB_INTERNAL zmemcmp(s1, s2, len)
     uInt j;
 
     for (j = 0; j < len; j++) {
-        if (s1[j] != s2[j]) return 2*(s1[j] > s2[j])-1;
+        if (s1[j] != s2[j]) return (2 * (s1[j] > s2[j]) - 1);
     }
-    return 0;
+    return (0);
 }
 
 void ZLIB_INTERNAL zmemzero(dest, len)
@@ -229,18 +229,18 @@ voidpf ZLIB_INTERNAL zcalloc (voidpf opaque, unsigned items, unsigned size)
      */
     if (bsize < 65520L) {
         buf = farmalloc(bsize);
-        if (*(ush*)&buf != 0) return buf;
+        if (*(ush*)&buf != 0) return (buf);
     } else {
         buf = farmalloc(bsize + 16L);
     }
-    if (buf == NULL || next_ptr >= MAX_PTR) return NULL;
+    if (buf == NULL || next_ptr >= MAX_PTR) return (NULL);
     table[next_ptr].org_ptr = buf;
 
     /* Normalize the pointer to seg:0 */
     *((ush*)&buf+1) += ((ush)((uch*)buf-0) + 15) >> 4;
     *(ush*)&buf = 0;
     table[next_ptr++].new_ptr = buf;
-    return buf;
+    return (buf);
 }
 
 void ZLIB_INTERNAL zcfree (voidpf opaque, voidpf ptr)
@@ -283,7 +283,7 @@ void ZLIB_INTERNAL zcfree (voidpf opaque, voidpf ptr)
 voidpf ZLIB_INTERNAL zcalloc (voidpf opaque, uInt items, uInt size)
 {
     (void)opaque;
-    return _halloc((long)items, size);
+    return (_halloc((long)items, size));
 }
 
 void ZLIB_INTERNAL zcfree (voidpf opaque, voidpf ptr)
diff --git a/vmod/vmod_proxy.c b/vmod/vmod_proxy.c
index b877d5bc1..099f64a0b 100644
--- a/vmod/vmod_proxy.c
+++ b/vmod/vmod_proxy.c
@@ -68,19 +68,19 @@ tlv_ssl_flag(VRT_CTX, int flag)
 VCL_BOOL v_matchproto_(td_proxy_is_ssl)
 vmod_is_ssl(VRT_CTX)
 {
-	return tlv_ssl_flag(ctx, PP2_CLIENT_SSL);
+	return (tlv_ssl_flag(ctx, PP2_CLIENT_SSL));
 }
 
 VCL_BOOL v_matchproto_(td_proxy_client_has_cert_sess)
 vmod_client_has_cert_sess(VRT_CTX)
 {
-	return tlv_ssl_flag(ctx, PP2_CLIENT_CERT_SESS);
+	return (tlv_ssl_flag(ctx, PP2_CLIENT_CERT_SESS));
 }
 
 VCL_BOOL v_matchproto_(td_proxy_client_has_cert_conn)
 vmod_client_has_cert_conn(VRT_CTX)
 {
-	return tlv_ssl_flag(ctx, PP2_CLIENT_CERT_CONN);
+	return (tlv_ssl_flag(ctx, PP2_CLIENT_CERT_CONN));
 }
 
 /* return come from SSL_get_verify_result */
@@ -120,41 +120,41 @@ tlv_string(VRT_CTX, int tlv)
 VCL_STRING v_matchproto_(td_proxy_alpn)
 vmod_alpn(VRT_CTX)
 {
-	return tlv_string(ctx, PP2_TYPE_ALPN);
+	return (tlv_string(ctx, PP2_TYPE_ALPN));
 }
 
 VCL_STRING v_matchproto_(td_proxy_authority)
 vmod_authority(VRT_CTX)
 {
-	return tlv_string(ctx, PP2_TYPE_AUTHORITY);
+	return (tlv_string(ctx, PP2_TYPE_AUTHORITY));
 }
 
 VCL_STRING v_matchproto_(td_proxy_ssl_version)
 vmod_ssl_version(VRT_CTX)
 {
-	return tlv_string(ctx, PP2_SUBTYPE_SSL_VERSION);
+	return (tlv_string(ctx, PP2_SUBTYPE_SSL_VERSION));
 }
 
 VCL_STRING v_matchproto_(td_proxy_ssl_cipher)
 vmod_ssl_cipher(VRT_CTX)
 {
-	return tlv_string(ctx, PP2_SUBTYPE_SSL_CIPHER);
+	return (tlv_string(ctx, PP2_SUBTYPE_SSL_CIPHER));
 }
 
 VCL_STRING v_matchproto_(td_proxy_cert_sign)
 vmod_cert_sign(VRT_CTX)
 {
-	return tlv_string(ctx, PP2_SUBTYPE_SSL_SIG_ALG);
+	return (tlv_string(ctx, PP2_SUBTYPE_SSL_SIG_ALG));
 }
 
 VCL_STRING v_matchproto_(td_proxy_cert_key)
 vmod_cert_key(VRT_CTX)
 {
-	return tlv_string(ctx, PP2_SUBTYPE_SSL_KEY_ALG);
+	return (tlv_string(ctx, PP2_SUBTYPE_SSL_KEY_ALG));
 }
 
 VCL_STRING v_matchproto_(td_proxy_client_cert_cn)
 vmod_client_cert_cn(VRT_CTX)
 {
-	return tlv_string(ctx, PP2_SUBTYPE_SSL_CN);
+	return (tlv_string(ctx, PP2_SUBTYPE_SSL_CN));
 }
diff --git a/vmod/vmod_std_conversions.c b/vmod/vmod_std_conversions.c
index 84ee9e14a..accc57f9d 100644
--- a/vmod/vmod_std_conversions.c
+++ b/vmod/vmod_std_conversions.c
@@ -124,16 +124,16 @@ vmod_bytes(VRT_CTX, struct VARGS(bytes) *a)
 	if (a->valid_s &&
 	    VNUM_2bytes(a->s, &r, 0) == NULL &&
 	    r <= VCL_BYTES_MAX)
-		return((VCL_BYTES)r);
+		return ((VCL_BYTES)r);
 
 	if (a->valid_real && !isnan(a->real) && a->real >= 0) {
 		rr = trunc(a->real);
 		if (rr <= (VCL_REAL)VCL_BYTES_MAX)
-			return((VCL_BYTES)rr);
+			return ((VCL_BYTES)rr);
 	}
 
 	if (a->valid_integer && a->integer >= 0)
-		return((VCL_BYTES)a->integer);
+		return ((VCL_BYTES)a->integer);
 
 	if (a->valid_fallback)
 		return (a->fallback);
@@ -325,7 +325,7 @@ vmod_real2integer(VRT_CTX, VCL_REAL r, VCL_INT i)
 		return (i);
 	r = round(r);
 	if (r > VCL_INT_MAX || r < VCL_INT_MIN)
-		return(i);
+		return (i);
 	return ((VCL_INT)r);
 }
 
@@ -349,7 +349,7 @@ vmod_time2integer(VRT_CTX, VCL_TIME t, VCL_INT i)
 		return (i);
 	t = round(t);
 	if (t > VCL_INT_MAX || t < VCL_INT_MIN)
-		return(i);
+		return (i);
 	return ((VCL_INT)t);
 }
 
@@ -363,4 +363,3 @@ vmod_time2real(VRT_CTX, VCL_TIME t, VCL_REAL r)
 
 	return (t);
 }
-
diff --git a/vmod/vmod_vtc.c b/vmod/vmod_vtc.c
index bc95fcb84..2b445d82b 100644
--- a/vmod/vmod_vtc.c
+++ b/vmod/vmod_vtc.c
@@ -208,7 +208,7 @@ vmod_workspace_free(VRT_CTX, VCL_ENUM which)
 
 	ws = vtc_ws_find(ctx, which);
 	if (ws == NULL)
-		return(-1);
+		return (-1);
 	WS_Assert(ws);
 
 	u = WS_ReserveAll(ws);


More information about the varnish-commit mailing list