[master] afb0a4e Fix compilation error

Tollef Fog Heen tfheen at varnish-cache.org
Thu Feb 3 14:45:45 CET 2011


commit afb0a4e2dde8f9eeea52a29b26a616eda8a60fe4
Author: Tollef Fog Heen <tfheen at varnish-software.com>
Date:   Thu Feb 3 14:38:33 2011 +0100

    Fix compilation error
    
    Use strcmp and not == for comparing strings

diff --git a/bin/varnishd/mgt_param.c b/bin/varnishd/mgt_param.c
index 70f1b3c..c8ad67c 100644
--- a/bin/varnishd/mgt_param.c
+++ b/bin/varnishd/mgt_param.c
@@ -1104,7 +1104,7 @@ MCF_DumpRst(void)
 		printf("%s\n", pp->name);
 		if (pp->units != NULL && *pp->units != '\0')
 			printf("\t- Units: %s\n", pp->units);
-		printf("\t- Default: %s\n", pp->def == MAGIC_INIT_STRING ? "magic" : pp->def);
+		printf("\t- Default: %s\n", strcmp(pp->def,MAGIC_INIT_STRING) == 0 ? "magic" : pp->def);
 		/*
 		 * XXX: we should mark the params with one/two flags
 		 * XXX: that say if ->min/->max are valid, so we



More information about the varnish-commit mailing list