[prev in list] [next in list] [prev in thread] [next in thread]
List: varnish-commit
Subject: [master] 4bbbc69 In theory diag_bitmap could change between (non-)assignment to t0 and use of t0. Al
From: Poul-Henning Kamp <phk () varnish-cache ! org>
Date: 2012-03-14 21:25:50
Message-ID: E1S7vhe-0002iU-Tm () project ! varnish-software ! com
[Download RAW message or body]
commit 4bbbc69324104deaac64d3845237f0c95ec625f4
Author: Poul-Henning Kamp <phk@FreeBSD.org>
Date: Wed Mar 14 21:24:42 2012 +0000
In theory diag_bitmap could change between (non-)assignment to t0
and use of t0. Always initialize t0 to something.
Correctly spotted by: FlexeLint
diff --git a/bin/varnishd/cache/cache_lck.c b/bin/varnishd/cache/cache_lck.c
index 3bbbfbb..993bb5e 100644
--- a/bin/varnishd/cache/cache_lck.c
+++ b/bin/varnishd/cache/cache_lck.c
@@ -64,7 +64,7 @@ Lck__Lock(struct lock *lck, const char *p, const char *f, int l)
{
struct ilck *ilck;
int r;
- double t0, t;
+ double t0 = 0, t;
CAST_OBJ_NOTNULL(ilck, lck->priv, ILCK_MAGIC);
if (!(cache_param->diag_bitmap & 0x98)) {
_______________________________________________
varnish-commit mailing list
varnish-commit@varnish-cache.org
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-commit
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic