[master] 2ade6d4 Make the assert for VSL docs actually do what I wanted it to do.

Poul-Henning Kamp phk at FreeBSD.org
Wed Feb 25 11:37:34 CET 2015


commit 2ade6d43897bb1b0fafc20a87657fa39420f5b27
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Wed Feb 25 10:23:53 2015 +0000

    Make the assert for VSL docs actually do what I wanted it to do.

diff --git a/bin/varnishd/mgt/mgt_main.c b/bin/varnishd/mgt/mgt_main.c
index 839cc6f..896f2dd 100644
--- a/bin/varnishd/mgt/mgt_main.c
+++ b/bin/varnishd/mgt/mgt_main.c
@@ -75,7 +75,8 @@ mgt_sltm(const char *tag, const char *sdesc, const char *ldesc)
 {
 	int i;
 
-	assert(sdesc != NULL || ldesc != NULL);
+	assert(sdesc != NULL && ldesc != NULL);
+	assert(*sdesc != '\0' || *ldesc != '\0');
 	printf("\n%s\n", tag);
 	i = strlen(tag);
 	printf("%*.*s\n\n", i, i, "------------------------------------");



More information about the varnish-commit mailing list