Fix incorrect logic for param count.
authorJason Parker <jparker@digium.com>
Fri, 8 Jun 2007 15:51:53 +0000 (15:51 +0000)
committerJason Parker <jparker@digium.com>
Fri, 8 Jun 2007 15:51:53 +0000 (15:51 +0000)
Issue 9918.

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@68449 65c4cc65-6c06-0410-ace0-fbb531ad65f3

res/res_config_sqlite.c

index a5bc1ef..f8f9d81 100644 (file)
@@ -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;
 }