bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [bug-gnulib] Re: iconv made easy


From: Paul Eggert
Subject: Re: [bug-gnulib] Re: iconv made easy
Date: Sat, 25 Dec 2004 20:47:48 -0800
User-agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux)

Simon Josefsson <address@hidden> writes:

> +    {
> +      char *q;
> +
> +      q = malloc (strlen (str) + 1);
> +      if (!q)
> +     return NULL;
> +
> +      return strcpy (q, str);
> +    }

One minor point: this could be "return strdup (str);", though you
should depend on the strdup module if you do that.

Another, less minor point: errno is garbage some times when
iconv_string fails, e.g., when have_error == 1.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]