[PATCH 2/2] Replace xstrdup with strdup

Peter Hutterer peter.hutterer at who-t.net
Tue May 18 15:34:44 PDT 2010


On Wed, May 19, 2010 at 02:01:19AM +0700, Mikhail Gusarov wrote:
> It is not possible for argument to be NULL here, it'd fall into branch above
> 
> Signed-off-by: Mikhail Gusarov <dottedmag at dottedmag.net>
> ---
>  dix/dixfonts.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/dix/dixfonts.c b/dix/dixfonts.c
> index 585754b..a7cf728 100644
> --- a/dix/dixfonts.c
> +++ b/dix/dixfonts.c
> @@ -1841,7 +1841,7 @@ SetDefaultFontPath(char *path)
>      if (!start) {
>  	temp_path = Xprintf("%s%sbuilt-ins", path, *path ? "," : "");
>      } else {
> -	temp_path = xstrdup(path);
> +	temp_path = strdup(path);
>      }
>      if (!temp_path)
>          return BadAlloc;
> -- 
> 1.7.1

if xstrdup isn't going away, do we want to start mixing strdup and xstrdup?
I'd prefer just one for consistency.
 
Cheers,
  Peter


More information about the xorg-devel mailing list