From 90c3a14ac04a4bfd3b76729262bd835e6daaa807 Mon Sep 17 00:00:00 2001 From: Jan-Erik Rediger Date: Thu, 20 Jun 2013 17:53:35 +0300 Subject: [PATCH] Initialize char* to NULL to remove compiler warning --- src/config.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/config.c b/src/config.c index 5595e924..6e0d4a87 100644 --- a/src/config.c +++ b/src/config.c @@ -1309,7 +1309,7 @@ void rewriteConfigOctalOption(struct rewriteConfigState *state, char *option, in * specified. See how the function is used for more information. */ void rewriteConfigEnumOption(struct rewriteConfigState *state, char *option, int value, ...) { va_list ap; - char *enum_name, *matching_name; + char *enum_name, *matching_name = NULL; int enum_val, def_val, force; sds line; @@ -1334,7 +1334,7 @@ void rewriteConfigEnumOption(struct rewriteConfigState *state, char *option, int void rewriteConfigSyslogfacilityOption(struct rewriteConfigState *state) { int value = server.syslog_facility, j; int force = value != LOG_LOCAL0; - char *name, *option = "syslog-facility"; + char *name = NULL, *option = "syslog-facility"; sds line; for (j = 0; validSyslogFacilities[j].name; j++) { -- GitLab