[master] a64da71 Fix expect cases without ident
Federico G. Schwindt
fgsch at lodoss.net
Mon Mar 23 18:14:04 CET 2015
commit a64da7176457e91d45b8ee4c264e3abec682122b
Author: Federico G. Schwindt <fgsch at lodoss.net>
Date: Mon Mar 23 17:02:53 2015 +0000
Fix expect cases without ident
diff --git a/bin/varnishtest/vtc_varnish.c b/bin/varnishtest/vtc_varnish.c
index 1fbc473..490171e 100644
--- a/bin/varnishtest/vtc_varnish.c
+++ b/bin/varnishtest/vtc_varnish.c
@@ -786,11 +786,13 @@ varnish_expect(const struct varnish *v, char * const *av) {
bprintf(sp.target_type, "%.*s", (int)(p - r), r);
p++;
q = strrchr(p, '.');
- bprintf(sp.target_name, "%s", q + 1);
- if (q == p)
+ if (q == NULL) {
sp.target_ident[0] = '\0';
- else
+ bprintf(sp.target_name, "%s", p);
+ } else {
bprintf(sp.target_ident, "%.*s", (int)(q - p), p);
+ bprintf(sp.target_name, "%s", q + 1);
+ }
}
sp.val = 0;
More information about the varnish-commit
mailing list