提交 c768e4b6 authored 作者: Michael Jerris's avatar Michael Jerris

CID:1215198 don't set variables that are not used, and clean up the bail out…

CID:1215198 don't set variables that are not used, and clean up the bail out usage condition to be more sane
上级 dcf633b1
......@@ -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;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论