From: Michael Jerris Date: Thu, 22 May 2014 14:52:56 +0000 (+0000) Subject: CID:1215198 don't set variables that are not used, and clean up the bail out usage... X-Git-Tag: v1.4.4~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c768e4b6e6cba2b3242f3210a05fe466219207dd;p=thirdparty%2Ffreeswitch.git CID:1215198 don't set variables that are not used, and clean up the bail out usage condition to be more sane --- diff --git a/src/mod/applications/mod_hash/mod_hash.c b/src/mod/applications/mod_hash/mod_hash.c index a6f515263d..d151bd7c9d 100644 --- a/src/mod/applications/mod_hash/mod_hash.c +++ b/src/mod/applications/mod_hash/mod_hash.c @@ -593,17 +593,15 @@ SWITCH_STANDARD_API(hash_dump_function) int realm = 0; char *realmvalue = NULL; - if (!zstr(cmd)) { - mydata = strdup(cmd); - switch_assert(mydata); - argc = switch_separate_string(mydata, ' ', argv, (sizeof(argv) / sizeof(argv[0]))); - cmd = argv[0]; - } else { - realmvalue = switch_mprintf("test"); - realm = 0; + if (zstr(cmd)) { stream->write_function(stream, "Usage: "HASH_DUMP_SYNTAX"\n"); goto done; - } + } + + mydata = strdup(cmd); + switch_assert(mydata); + argc = switch_separate_string(mydata, ' ', argv, (sizeof(argv) / sizeof(argv[0]))); + cmd = argv[0]; if (argc == 2) { realm = 1;