[master] e60cfbc A bit of FlexeLint nit-pickery
Poul-Henning Kamp
phk at varnish-cache.org
Wed Oct 10 11:20:27 CEST 2012
commit e60cfbcff3b427376d24b0cba5cb324514b5df1c
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date: Wed Oct 10 09:20:14 2012 +0000
A bit of FlexeLint nit-pickery
diff --git a/bin/varnishd/cache/cache_expire.c b/bin/varnishd/cache/cache_expire.c
index 6e27c08..80c630f 100644
--- a/bin/varnishd/cache/cache_expire.c
+++ b/bin/varnishd/cache/cache_expire.c
@@ -477,6 +477,8 @@ EXP_NukeLRU(struct worker *wrk, struct vsl_log *vsl, struct lru *lru)
CHECK_OBJ_NOTNULL(wrk, WORKER_MAGIC);
CHECK_OBJ_NOTNULL(lru, LRU_MAGIC);
+ memset(oc_array, 0, sizeof oc_array);
+
t = VTIM_real();
Lck_Lock(&lru->mtx);
while (!VTAILQ_EMPTY(&lru->lru_head)) {
diff --git a/bin/varnishd/storage/storage_persistent.c b/bin/varnishd/storage/storage_persistent.c
index 5f756b7..24a4d08 100644
--- a/bin/varnishd/storage/storage_persistent.c
+++ b/bin/varnishd/storage/storage_persistent.c
@@ -76,7 +76,7 @@ smp_appendban(struct smp_sc *sc, struct smp_signspace *spc,
(void)sc;
ptr = ptr2 = SIGNSPACE_FRONT(spc);
- assert(SIGNSPACE_FREE(spc) >= 4 + 4 + len);
+ assert(SIGNSPACE_FREE(spc) >= 4L + 4 + len);
memcpy(ptr, "BAN", 4);
ptr += 4;
@@ -412,7 +412,7 @@ smp_close(const struct stevedore *st)
CAST_OBJ_NOTNULL(sc, st->priv, SMP_SC_MAGIC);
- pthread_join(sc->bgthread, &status);
+ AZ(pthread_join(sc->bgthread, &status));
AZ(status);
}
diff --git a/bin/varnishd/storage/storage_persistent_subr.c b/bin/varnishd/storage/storage_persistent_subr.c
index f73ae06..0b1b7da 100644
--- a/bin/varnishd/storage/storage_persistent_subr.c
+++ b/bin/varnishd/storage/storage_persistent_subr.c
@@ -269,8 +269,7 @@ smp_new_signspace(const struct smp_sc *sc, struct smp_signspace *spc,
void
smp_msync(void *addr, size_t length)
{
- uintptr_t start, end;
- int pagesize;
+ uintptr_t start, end, pagesize;
pagesize = getpagesize();
assert(pagesize > 0 && PWR2(pagesize));
More information about the varnish-commit
mailing list