]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Solaris won't printf a NULL.
authorTilghman Lesher <tilghman@meg.abyt.es>
Fri, 24 Sep 2010 13:53:30 +0000 (13:53 +0000)
committerTilghman Lesher <tilghman@meg.abyt.es>
Fri, 24 Sep 2010 13:53:30 +0000 (13:53 +0000)
(closes issue #18041)
 Reported by: asgaroth

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

funcs/func_strings.c

index f69cf8d62d8cb44e5e9d411a66267e3bf1098c96..9af4dfca4f9ab91a4ea4921a554ff2141f8e44a8 100644 (file)
@@ -609,14 +609,14 @@ static int array(struct ast_channel *chan, const char *cmd, char *var,
         * want them to be surprised by the result.  Hence, we prefer commas as the
         * delimiter, but we'll fall back to vertical bars if commas aren't found.
         */
-       ast_debug(1, "array (%s=%s)\n", var, value2);
+       ast_debug(1, "array (%s=%s)\n", var, S_OR(value2, ""));
        AST_STANDARD_APP_ARGS(arg1, var);
 
        AST_STANDARD_APP_ARGS(arg2, value2);
 
        for (i = 0; i < arg1.argc; i++) {
                ast_debug(1, "array set value (%s=%s)\n", arg1.var[i],
-                               arg2.val[i]);
+                               S_OR(arg2.val[i], ""));
                if (i < arg2.argc) {
                        if (ishash) {
                                snprintf(varname, sizeof(varname), HASH_FORMAT, origvar, arg1.var[i]);