Merged revisions 82514 via svnmerge from
authorJoshua Colp <jcolp@digium.com>
Mon, 17 Sep 2007 02:02:09 +0000 (02:02 +0000)
committerJoshua Colp <jcolp@digium.com>
Mon, 17 Sep 2007 02:02:09 +0000 (02:02 +0000)
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r82514 | file | 2007-09-16 23:00:59 -0300 (Sun, 16 Sep 2007) | 4 lines

(closes issue #10734)
Reported by: asgaroth
Instead of passing a NULL pointer into snprintf pass "". It makes Solaris much happier.

........

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

main/pbx.c

index c879c58..82f69c5 100644 (file)
@@ -3329,7 +3329,7 @@ static void print_ext(struct ast_exten *e, char * buf, int buflen)
        } else {
                snprintf(buf, buflen, "%d. %s(%s)",
                        prio, ast_get_extension_app(e),
        } else {
                snprintf(buf, buflen, "%d. %s(%s)",
                        prio, ast_get_extension_app(e),
-                       (char *)ast_get_extension_app_data(e));
+                       (!ast_strlen_zero(ast_get_extension_app_data(e)) ? (char *)ast_get_extension_app_data(e) : ""));
        }
 }
 
        }
 }