[PATCH 06/11] Add X*asprintf() routines to mirror common asprintf() routines

Julien Cristau jcristau at debian.org
Tue Nov 30 01:56:52 PST 2010


On Mon, Nov 29, 2010 at 20:57:43 -0800, Alan Coopersmith wrote:

> +/* Old api, now deprecated, may be removed in a future release */
> +char *
> +Xvprintf(const char *format, va_list va)
> +{
> +    char *ret;
> +
> +    Xvasprintf(&ret, format, va);
> +
>      return ret;
>  }
>  
> @@ -68,7 +191,7 @@ char *Xprintf(const char *format, ...)
>      char *ret;
>      va_list va;
>      va_start(va, format);
> -    ret = Xvprintf(format, va);
> +    Xvasprintf(&ret, format, va);
>      va_end(va);
>      return ret;
>  }

Shouldn't these two check for -1 return from Xvasprintf?

Cheers,
Julien


More information about the xorg-devel mailing list