lib: fix shadowing and wrong variable type
authorRémi Denis-Courmont <remi@remlab.net>
Thu, 18 Sep 2014 15:07:02 +0000 (18:07 +0300)
committerRémi Denis-Courmont <remi@remlab.net>
Sun, 21 Sep 2014 08:39:53 +0000 (11:39 +0300)
asprintf() returns an int, not a char *.

lib/vlm.c

index aad066b..4c75ef6 100644 (file)
--- a/lib/vlm.c
+++ b/lib/vlm.c
@@ -286,7 +286,7 @@ static char* recurse_answer( vlm_message_t *p_answer, const char* psz_delim,
                 strcmp( aw_child->psz_name, "inputs" ) == 0 ||
                 strcmp( aw_child->psz_name, "options" ) == 0 )
             {
-                char *psz_recurse = recurse_answer( aw_child, psz_childdelim, 1 ),
+                char *psz_recurse = recurse_answer( aw_child, psz_childdelim, 1 );
                 i_success = asprintf( &psz_tmp, "%s[%s%s%s]%c%s",
                                       psz_response, psz_childdelim, psz_recurse,
                                       psz_delim, c_comma, psz_delim );
@@ -300,7 +300,7 @@ static char* recurse_answer( vlm_message_t *p_answer, const char* psz_delim,
              */
             else
             {
-                char *psz_recurse = recurse_answer( aw_child, psz_childdelim, 0 ),
+                char *psz_recurse = recurse_answer( aw_child, psz_childdelim, 0 );
                 i_success = asprintf( &psz_tmp, "%s{%s%s%s%s}%c%s",
                                       psz_response, psz_childdelim, psz_nametag,
                                       psz_recurse, psz_delim, c_comma, psz_delim );