bad code in lib/format.c?

Chris Niekel <[email protected]>
Newsgroups gmane.network.sn
Message-ID <[email protected]>
Hi,

I'm building a new debian package for sn, and am checking for all
changes I made, whether they made it into 0.3.8..

While doing this, I noticed in lib/format.c, there is the formats function:
int formats (char *buf, int size, char *fmt, ...)
{
    va_list ap;

    va_start(ap, fmt);
    return formatv(buf, size, fmt, ap);
    va_end(ap);
}

In this case, va_end won't always be called. I'm not sure whether it's a
problem, but wouldn't changing it to:
    int r = formatv(buf, size, fmt, ap);
    va_end(ap);
    return r;

be a bit more cleaner?

Regards,
    Chris 
-- 
    I've been down so long, if I'd cheer up, I'd still be depressed.
            - Lisa Simpson, Moanin' Lisa Blues.
signature.asc (application/pgp-signature, 189 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFBHzBvgQ3S2XWlk0sRAvAjAJ9dPrJ/A53tAonfCftgylm2TxGFVgCfXb8q
6ljWR/o4yFMeiaI3W50680k=
=s9yQ
-----END PGP SIGNATURE-----
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.