Commit 8996130e authored by Peter Pentchev's avatar Peter Pentchev

config-test: do not ignore the vasprintf() return value.

parent 338ffcc1
......@@ -30,16 +30,17 @@ static int handler(void)
#if defined(TEST_VASPRINTF)
static char *run_vasprintf(char * const dst, ...)
static const char *run_vasprintf(char * const dst, ...)
char *res;
int ret;
va_list v;
va_start(v, dst);
vasprintf(&res, "%d", v);
ret = vasprintf(&res, "%d", v);
return (res);
return (ret == -1? "0": res);
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment