CID:1215198 don't set variables that are not used, and clean up the bail out usage condition to be more sane

This commit is contained in:
Michael Jerris 2014-05-22 14:52:56 +00:00
parent dcf633b1dd
commit c768e4b6e6
1 changed files with 7 additions and 9 deletions

View File

@ -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;