提交 7e1df774 authored 作者: Chris Rienzo's avatar Chris Rienzo 提交者: Andrey Volk

FS-11785 [mod_commands] scan-build thinks NULL parameter is being passed to…

FS-11785 [mod_commands] scan-build thinks NULL parameter is being passed to function.  Shouldn't actually happen.
上级 12316c8d
...@@ -5743,7 +5743,7 @@ SWITCH_STANDARD_API(show_function) ...@@ -5743,7 +5743,7 @@ SWITCH_STANDARD_API(show_function)
if (argv[1] && !strcasecmp(argv[1], "count")) { if (argv[1] && !strcasecmp(argv[1], "count")) {
switch_snprintfv(sql, sizeof(sql), "select count(*) from basic_calls where hostname='%q'", switch_core_get_switchname()); switch_snprintfv(sql, sizeof(sql), "select count(*) from basic_calls where hostname='%q'", switch_core_get_switchname());
holder.justcount = 1; holder.justcount = 1;
if (argv[3] && !strcasecmp(argv[2], "as")) { if (argv[2] && argv[3] && !strcasecmp(argv[2], "as")) {
as = argv[3]; as = argv[3];
} }
} }
...@@ -5752,7 +5752,7 @@ SWITCH_STANDARD_API(show_function) ...@@ -5752,7 +5752,7 @@ SWITCH_STANDARD_API(show_function)
if (argv[1] && !strcasecmp(argv[1], "count")) { if (argv[1] && !strcasecmp(argv[1], "count")) {
switch_snprintfv(sql, sizeof(sql), "select count(*) from registrations where hostname='%q'", switch_core_get_switchname()); switch_snprintfv(sql, sizeof(sql), "select count(*) from registrations where hostname='%q'", switch_core_get_switchname());
holder.justcount = 1; holder.justcount = 1;
if (argv[3] && !strcasecmp(argv[2], "as")) { if (argv[2] && argv[3] && !strcasecmp(argv[2], "as")) {
as = argv[3]; as = argv[3];
} }
} }
...@@ -5784,7 +5784,7 @@ SWITCH_STANDARD_API(show_function) ...@@ -5784,7 +5784,7 @@ SWITCH_STANDARD_API(show_function)
if (argv[1] && !strcasecmp(argv[1], "count")) { if (argv[1] && !strcasecmp(argv[1], "count")) {
switch_snprintfv(sql, sizeof(sql), "select count(*) from channels where hostname='%q'", switch_core_get_switchname()); switch_snprintfv(sql, sizeof(sql), "select count(*) from channels where hostname='%q'", switch_core_get_switchname());
holder.justcount = 1; holder.justcount = 1;
if (argv[3] && !strcasecmp(argv[2], "as")) { if (argv[2] && argv[3] && !strcasecmp(argv[2], "as")) {
as = argv[3]; as = argv[3];
} }
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论