[master] 37d738e Kill some dead assignments
Federico G. Schwindt
fgsch at lodoss.net
Thu Dec 24 15:06:50 CET 2015
commit 37d738ea4c04629766e510daf3d440ac621d8156
Author: Federico G. Schwindt <fgsch at lodoss.net>
Date: Thu Dec 24 13:32:10 2015 +0000
Kill some dead assignments
diff --git a/bin/varnishd/cache/cache_session.c b/bin/varnishd/cache/cache_session.c
index 3d23c7c..f1bb4c0 100644
--- a/bin/varnishd/cache/cache_session.c
+++ b/bin/varnishd/cache/cache_session.c
@@ -238,7 +238,6 @@ SES_RxStuff(struct http_conn *htc, htc_complete_f *func,
/* Working on it */
if (t1 != NULL && isnan(*t1))
*t1 = now;
- tmo = tn - now;
} else if (hs != HTC_S_EMPTY)
WRONG("htc_status_e");
diff --git a/bin/varnishstat/varnishstat_curses.c b/bin/varnishstat/varnishstat_curses.c
index a27d438..174df57 100644
--- a/bin/varnishstat/varnishstat_curses.c
+++ b/bin/varnishstat/varnishstat_curses.c
@@ -943,10 +943,8 @@ draw_bar_b(void)
level->label);
X -= strlen(level->label) + 2;
}
- if (!hide_unseen) {
+ if (!hide_unseen)
mvwprintw(w_bar_b, 0, X - 6, "%s", "UNSEEN");
- X -= 8;
- }
wnoutrefresh(w_bar_b);
}
diff --git a/bin/varnishtest/vtc_logexp.c b/bin/varnishtest/vtc_logexp.c
index 767f7e6..1c0ea70 100644
--- a/bin/varnishtest/vtc_logexp.c
+++ b/bin/varnishtest/vtc_logexp.c
@@ -283,7 +283,6 @@ logexp_thread(void *priv)
AN(le->vsm);
AN(le->vslq);
- i = 0;
AZ(le->test);
vtc_log(le->vl, 4, "beg|");
if (le->query != NULL)
diff --git a/bin/varnishtest/vtc_varnish.c b/bin/varnishtest/vtc_varnish.c
index 1c00ed0..292be63 100644
--- a/bin/varnishtest/vtc_varnish.c
+++ b/bin/varnishtest/vtc_varnish.c
@@ -237,14 +237,10 @@ varnishlog_thread(void *priv)
tag = VSL_TAG(c->rec.ptr);
vxid = VSL_ID(c->rec.ptr);
- if (tag == SLT__Batch) {
- tagname = "Batch";
- len = 0;
+ if (tag == SLT__Batch)
continue;
- } else {
- tagname = VSL_tags[tag];
- len = VSL_LEN(c->rec.ptr);
- }
+ tagname = VSL_tags[tag];
+ len = VSL_LEN(c->rec.ptr);
type = VSL_CLIENT(c->rec.ptr) ? 'c' : VSL_BACKEND(c->rec.ptr) ?
'b' : '-';
data = VSL_CDATA(c->rec.ptr);
diff --git a/lib/libvcc/vcc_acl.c b/lib/libvcc/vcc_acl.c
index b9722ce..b5ee224 100644
--- a/lib/libvcc/vcc_acl.c
+++ b/lib/libvcc/vcc_acl.c
@@ -348,7 +348,6 @@ vcc_acl_emit(struct vcc *tl, const char *acln, int anon)
struct acl_e *ae;
int depth, l, m, i;
unsigned at[VRT_ACL_MAXADDR + 1];
- const char *oc;
struct token *t;
struct inifin *ifp;
@@ -371,7 +370,6 @@ vcc_acl_emit(struct vcc *tl, const char *acln, int anon)
"\tif (0) match_acl_named_%s(0, 0);\n", acln);
}
depth = -1;
- oc = 0;
at[0] = 256;
VTAILQ_FOREACH(ae, &tl->acl, list) {
@@ -383,7 +381,6 @@ vcc_acl_emit(struct vcc *tl, const char *acln, int anon)
}
/* Back down, if necessary */
- oc = "";
while (l <= depth) {
Fh(tl, 0, "\t%*s}\n", -depth, "");
depth--;
@@ -397,23 +394,21 @@ vcc_acl_emit(struct vcc *tl, const char *acln, int anon)
for (i = l; m >= 8; m -= 8, i++) {
if (i == 0)
Fh(tl, 0, "\t%*s%sif (fam == %d) {\n",
- -i, "", oc, ae->data[i]);
+ -i, "", "", ae->data[i]);
else
Fh(tl, 0, "\t%*s%sif (a[%d] == %d) {\n",
- -i, "", oc, i - 1, ae->data[i]);
+ -i, "", "", i - 1, ae->data[i]);
at[i] = ae->data[i];
depth = i;
- oc = "";
}
if (m > 0) {
/* Do fractional byte compares */
Fh(tl, 0, "\t%*s%sif ((a[%d] & 0x%x) == %d) {\n",
- -i, "", oc, i - 1, (0xff00 >> m) & 0xff,
+ -i, "", "", i - 1, (0xff00 >> m) & 0xff,
ae->data[i] & ((0xff00 >> m) & 0xff));
at[i] = 256;
depth = i;
- oc = "";
}
i = (ae->mask + 7) / 8;
More information about the varnish-commit
mailing list