[master] 6460036 Minor adjustment to asserts
Poul-Henning Kamp
phk at varnish-cache.org
Tue Oct 25 11:45:10 CEST 2011
commit 6460036898caf29c6be27e5bec9722f27b5edf44
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date: Tue Oct 25 09:39:12 2011 +0000
Minor adjustment to asserts
diff --git a/bin/varnishtest/vtc_log.c b/bin/varnishtest/vtc_log.c
index 313d3ab..651bd89 100644
--- a/bin/varnishtest/vtc_log.c
+++ b/bin/varnishtest/vtc_log.c
@@ -132,7 +132,7 @@ vtc_log(struct vtclog *vl, int lvl, const char *fmt, ...)
tx = VTIM_mono() - t0;
AZ(pthread_mutex_lock(&vl->mtx));
vl->act = 1;
- assert(lvl < NLEAD);
+ assert(lvl < (int)NLEAD);
VSB_clear(vl->vsb);
VSB_printf(vl->vsb, "%s %-4s %4.1f ",
lead[lvl < 0 ? 1: lvl], vl->id, tx);
@@ -170,8 +170,8 @@ vtc_dump(struct vtclog *vl, int lvl, const char *pfx, const char *str, int len)
CHECK_OBJ_NOTNULL(vl, VTCLOG_MAGIC);
tx = VTIM_mono() - t0;
- assert(lvl < NLEAD);
assert(lvl >= 0);
+ assert(lvl < NLEAD);
AZ(pthread_mutex_lock(&vl->mtx));
vl->act = 1;
VSB_clear(vl->vsb);
@@ -237,8 +237,8 @@ vtc_hexdump(struct vtclog *vl, int lvl, const char *pfx, const unsigned char *st
CHECK_OBJ_NOTNULL(vl, VTCLOG_MAGIC);
tx = VTIM_mono() - t0;
assert(len >= 0);
- assert(lvl < NLEAD);
assert(lvl >= 0);
+ assert(lvl < NLEAD);
AZ(pthread_mutex_lock(&vl->mtx));
vl->act = 1;
VSB_clear(vl->vsb);
More information about the varnish-commit
mailing list