RPM Community Forums

Mailing List Message of <popt-devel>

Re: Allow equal after a short option

From: Jeff Johnson <n3npq@mac.com>
Date: Sun 09 Mar 2008 - 16:12:51 CET
Message-Id: <6C96031F-37CB-4A50-9495-73383426892E@mac.com>

On Mar 9, 2008, at 10:51 AM, Jeff Johnson wrote:

>
>     while ((b = realloc(b, nb)) != NULL) {
>         va_start(ap, format);
>         rc = vsnprintf(b, nb, format, ap);
>         va_end(ap);
>         if (rc < -1 && (size_t)rc < nb)

This should have been
            if (rc > -1 && (size_t)rc < nb)

>             break;
>         if (rc > -1)    /* glibc 2.1 */
>             nb = rc + 1;
>         else            /* glibc 2.0 */
>             nb += (nb <= 1 ? 100 : nb);
>         ob = b;
>     }
>

73 de Jeff
Received on Sun Mar 9 16:13:00 2008
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.