[master] 3474e45d8 Code style OCD
Dridi Boukelmoune
dridi.boukelmoune at gmail.com
Tue May 21 16:29:08 UTC 2019
commit 3474e45d85d19bf5f738ac6c1ad2b6cb8e02f744
Author: Dridi Boukelmoune <dridi.boukelmoune at gmail.com>
Date: Tue May 21 18:25:14 2019 +0200
Code style OCD
Done with git tricks involving:
sed '
s:NEEDLESS(return NULL):NEEDLESS(return (NULL)):
s:NEEDLESS(return(:NEEDLESS(return (:
'
Unfortunately it won't work with a Coccinelle patch, so I couldn't
update return.cocci to handle the NEEDLESS case.
diff --git a/bin/varnishd/cache/cache_acceptor.c b/bin/varnishd/cache/cache_acceptor.c
index 8300d1b5d..3336fd89f 100644
--- a/bin/varnishd/cache/cache_acceptor.c
+++ b/bin/varnishd/cache/cache_acceptor.c
@@ -616,7 +616,7 @@ vca_acct(void *arg)
}
vca_periodic(t0);
}
- NEEDLESS(return NULL);
+ NEEDLESS(return (NULL));
}
/*--------------------------------------------------------------------*/
diff --git a/bin/varnishd/cache/cache_backend_probe.c b/bin/varnishd/cache/cache_backend_probe.c
index c87c73465..571154859 100644
--- a/bin/varnishd/cache/cache_backend_probe.c
+++ b/bin/varnishd/cache/cache_backend_probe.c
@@ -491,7 +491,7 @@ vbp_thread(struct worker *wrk, void *priv)
}
}
NEEDLESS(Lck_Unlock(&vbp_mtx));
- NEEDLESS(return NULL);
+ NEEDLESS(return (NULL));
}
diff --git a/bin/varnishd/cache/cache_ban_lurker.c b/bin/varnishd/cache/cache_ban_lurker.c
index 55a6b6402..ba083cddb 100644
--- a/bin/varnishd/cache/cache_ban_lurker.c
+++ b/bin/varnishd/cache/cache_ban_lurker.c
@@ -447,5 +447,5 @@ ban_lurker(struct worker *wrk, void *priv)
Lck_Unlock(&ban_mtx);
}
pthread_exit(0);
- NEEDLESS(return NULL);
+ NEEDLESS(return (NULL));
}
diff --git a/bin/varnishd/cache/cache_expire.c b/bin/varnishd/cache/cache_expire.c
index 85a435741..288c6a4d8 100644
--- a/bin/varnishd/cache/cache_expire.c
+++ b/bin/varnishd/cache/cache_expire.c
@@ -361,7 +361,7 @@ exp_thread(struct worker *wrk, void *priv)
else
tnext = exp_expire(ep, t);
}
- NEEDLESS(return NULL);
+ NEEDLESS(return (NULL));
}
/*--------------------------------------------------------------------*/
diff --git a/bin/varnishd/cache/cache_fetch.c b/bin/varnishd/cache/cache_fetch.c
index eb25de6e9..88ee91cd8 100644
--- a/bin/varnishd/cache/cache_fetch.c
+++ b/bin/varnishd/cache/cache_fetch.c
@@ -824,7 +824,7 @@ static enum fetch_step
vbf_stp_done(void)
{
WRONG("Just plain wrong");
- NEEDLESS(return(F_STP_DONE));
+ NEEDLESS(return (F_STP_DONE));
}
static void v_matchproto_(task_func_t)
diff --git a/bin/varnishd/cache/cache_pool.c b/bin/varnishd/cache/cache_pool.c
index 35be8ad00..75ed4bd94 100644
--- a/bin/varnishd/cache/cache_pool.c
+++ b/bin/varnishd/cache/cache_pool.c
@@ -233,7 +233,7 @@ pool_poolherder(void *priv)
Lck_Unlock(&pool_mtx);
VSC_C_main->thread_queue_len = u;
}
- NEEDLESS(return NULL);
+ NEEDLESS(return (NULL));
}
/*--------------------------------------------------------------------*/
diff --git a/bin/varnishd/cache/cache_vrt_priv.c b/bin/varnishd/cache/cache_vrt_priv.c
index fe9da5d77..daa667aab 100644
--- a/bin/varnishd/cache/cache_vrt_priv.c
+++ b/bin/varnishd/cache/cache_vrt_priv.c
@@ -163,7 +163,7 @@ VRT_priv_top(VRT_CTX, const void *vmod_id)
CHECK_OBJ_NOTNULL(ctx, VRT_CTX_MAGIC);
if (ctx->req == NULL) {
WRONG("PRIV_TOP is only accessible in client VCL context");
- NEEDLESS(return NULL);
+ NEEDLESS(return (NULL));
}
CHECK_OBJ_NOTNULL(ctx->req, REQ_MAGIC);
req = ctx->req->topreq;
diff --git a/bin/varnishd/cache/cache_wrk.c b/bin/varnishd/cache/cache_wrk.c
index 2481f9cdf..a0662c221 100644
--- a/bin/varnishd/cache/cache_wrk.c
+++ b/bin/varnishd/cache/cache_wrk.c
@@ -97,7 +97,7 @@ wrk_bgthread(void *arg)
WRONG("BgThread terminated");
- NEEDLESS(return NULL);
+ NEEDLESS(return (NULL));
}
void
diff --git a/bin/varnishd/hash/hash_critbit.c b/bin/varnishd/hash/hash_critbit.c
index 515de002c..1f1a36c1a 100644
--- a/bin/varnishd/hash/hash_critbit.c
+++ b/bin/varnishd/hash/hash_critbit.c
@@ -328,7 +328,7 @@ hcb_cleaner(struct worker *wrk, void *priv)
Pool_Sumstat(wrk);
VTIM_sleep(cache_param->critbit_cooloff);
}
- NEEDLESS(return NULL);
+ NEEDLESS(return (NULL));
}
/*--------------------------------------------------------------------*/
diff --git a/bin/varnishd/storage/storage_persistent.c b/bin/varnishd/storage/storage_persistent.c
index 95f7b4f88..3125c8d35 100644
--- a/bin/varnishd/storage/storage_persistent.c
+++ b/bin/varnishd/storage/storage_persistent.c
@@ -312,7 +312,7 @@ smp_thread(struct worker *wrk, void *priv)
Lck_Unlock(&sc->mtx);
pthread_exit(0);
- NEEDLESS(return NULL);
+ NEEDLESS(return (NULL));
}
/*--------------------------------------------------------------------
diff --git a/bin/varnishd/waiter/cache_waiter_poll.c b/bin/varnishd/waiter/cache_waiter_poll.c
index 74c65aca7..1736ba300 100644
--- a/bin/varnishd/waiter/cache_waiter_poll.c
+++ b/bin/varnishd/waiter/cache_waiter_poll.c
@@ -206,7 +206,7 @@ vwp_main(void *priv)
if (vwp->pollfd[0].revents)
vwp_dopipe(vwp);
}
- NEEDLESS(return NULL);
+ NEEDLESS(return (NULL));
}
/*--------------------------------------------------------------------*/
diff --git a/bin/varnishtest/vtc_server.c b/bin/varnishtest/vtc_server.c
index 1a4054a4b..5b05f19cc 100644
--- a/bin/varnishtest/vtc_server.c
+++ b/bin/varnishtest/vtc_server.c
@@ -350,7 +350,7 @@ server_dispatch_thread(void *priv)
}
pthread_cleanup_pop(0);
vtc_logclose(vl);
- NEEDLESS(return(NULL));
+ NEEDLESS(return (NULL));
}
static void
diff --git a/lib/libvarnish/vsa.c b/lib/libvarnish/vsa.c
index 296f01374..836747eac 100644
--- a/lib/libvarnish/vsa.c
+++ b/lib/libvarnish/vsa.c
@@ -363,7 +363,7 @@ VSA_Compare_IP(const struct suckaddr *sua1, const struct suckaddr *sua2)
default:
WRONG("Just plain insane");
}
- NEEDLESS(return(-1));
+ NEEDLESS(return (-1));
}
struct suckaddr *
More information about the varnish-commit
mailing list