Eric Blake writes:
> According to Simon Josefsson on 11/13/2009 2:53 AM:
>> +
>> + result = my_xasprintf ("");
>> + ASSERT (result != NULL);
>> + ASSERT (strcmp (result, "") == 0);
>> +
>
> Don't forget to free() result between each test, so that we don't keep
> leaking memory.
Thanks, fixed
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
According to Simon Josefsson on 11/13/2009 2:53 AM:
> +
> + result = my_xasprintf ("");
> + ASSERT (result != NULL);
> + ASSERT (strcmp (result, "") == 0);
> +
Don't forget to free() result between each test, so that we don't keep
leaking memory.
Inspired by
http://www.gnu.org/software/gnulib/coverage/gllib/xvasprintf.c.gcov.frameset.html
I improved the xvasprintf self-check below.
/Simon
>From e718463703e9f7a3d60eeb360fca7efb2562c6b2 Mon Sep 17 00:00:00 2001
From: Simon Josefsson
Date: Fri, 13 Nov 2009 10:53:06 +0100
Subject: [PATCH]