From: William King Date: Mon, 28 Apr 2014 15:46:48 +0000 (-0700) Subject: fixing commit a7108411233058511c59227617e446f28384dbd0 in switch_config X-Git-Tag: v1.5.12~145 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0d8f954e0954ca24d097b8300e70bf2ae0eb6141;p=thirdparty%2Ffreeswitch.git fixing commit a7108411233058511c59227617e446f28384dbd0 in switch_config Previous commit actually broke the functionality since it was now returning if cfg->path[0] was not null. Also since cfg->path can never be null, this check can be simplified to only check the first index. --- diff --git a/src/switch_config.c b/src/switch_config.c index 96999ad1e2..93fcfad7ad 100644 --- a/src/switch_config.c +++ b/src/switch_config.c @@ -105,7 +105,7 @@ SWITCH_DECLARE(int) switch_config_next_pair(switch_config_t *cfg, char **var, ch *var = *val = NULL; - if ( !cfg->path || (cfg->path && cfg->path[0] != '\0' )) { + if ( !cfg->path[0] ){ return 0; }