]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
talloc: Put comment back in appropriate place
authorJoseph Sutton <josephsutton@catalyst.net.nz>
Wed, 1 Mar 2023 21:22:45 +0000 (10:22 +1300)
committerAndreas Schneider <asn@cryptomilk.org>
Wed, 12 Apr 2023 13:52:31 +0000 (13:52 +0000)
This comment originally referred, not to a va_copy() call, but to the
use of &c with vsnprintf() rather than passing in NULL with a length of
zero.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn@samba.org>
lib/talloc/talloc.c

index 41fa45bc99bbe10ab21878234a0c97b0897e8353..72f3eb729ad802b3053000e1416ec37c3596f89e 100644 (file)
@@ -2598,7 +2598,6 @@ static struct talloc_chunk *_vasprintf_tc(const void *t,
        struct talloc_chunk *tc = NULL;
        char buf[1024];
 
-       /* this call looks strange, but it makes it work on older solaris boxes */
        va_copy(ap2, ap);
        vlen = vsnprintf(buf, sizeof(buf), fmt, ap2);
        va_end(ap2);
@@ -2662,6 +2661,7 @@ static inline char *__talloc_vaslenprintf_append(char *s, size_t slen,
        char c;
 
        va_copy(ap2, ap);
+       /* this call looks strange, but it makes it work on older solaris boxes */
        alen = vsnprintf(&c, 1, fmt, ap2);
        va_end(ap2);