aboutsummaryrefslogtreecommitdiffstats
path: root/res/res_config_sqlite.c
diff options
context:
space:
mode:
authorqwell <qwell@f38db490-d61c-443f-a65b-d21fe96a405b>2007-06-08 15:51:53 +0000
committerqwell <qwell@f38db490-d61c-443f-a65b-d21fe96a405b>2007-06-08 15:51:53 +0000
commit0f880154ef09db05dc5ab13195f0fa7bc57c8b06 (patch)
tree792a276bb6c9ec3aac46d3481474b5c621e14ae6 /res/res_config_sqlite.c
parentd5867cf80a2bb006f745a9e6940a05d29e750908 (diff)
Fix incorrect logic for param count.
Issue 9918. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@68449 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'res/res_config_sqlite.c')
-rw-r--r--res/res_config_sqlite.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/res/res_config_sqlite.c b/res/res_config_sqlite.c
index a5bc1ef06..f8f9d81d1 100644
--- a/res/res_config_sqlite.c
+++ b/res/res_config_sqlite.c
@@ -804,12 +804,11 @@ static size_t get_params(va_list ap, const char ***params_ptr, const char ***val
params_count++;
}
- if (params_count)
- ast_log(LOG_WARNING, "1 parameter and 1 value at least required\n");
- else {
+ if (params_count > 0) {
*params_ptr = params;
*vals_ptr = vals;
- }
+ } else
+ ast_log(LOG_WARNING, "1 parameter and 1 value at least required\n");
return params_count;
}