From b56dab83a4537175b998b137e7ea2f2558042593 Mon Sep 17 00:00:00 2001 From: James Peach Date: Thu, 9 Feb 2006 00:49:03 +0000 Subject: r13400: Only return NULL from talloc_asprintf if vsnprintf returns an error (ie. zero is not an error). (This used to be commit 1ab4674196b9df0b2b7b6eb4991358cc2f86c0d9) --- source4/lib/talloc/talloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source4/lib/talloc') diff --git a/source4/lib/talloc/talloc.c b/source4/lib/talloc/talloc.c index 6b3328420d..577fa4a182 100644 --- a/source4/lib/talloc/talloc.c +++ b/source4/lib/talloc/talloc.c @@ -1011,7 +1011,7 @@ char *talloc_vasprintf(const void *t, const char *fmt, va_list ap) VA_COPY(ap2, ap); - if ((len = vsnprintf(NULL, 0, fmt, ap2)) <= 0) { + if ((len = vsnprintf(NULL, 0, fmt, ap2)) < 0) { return NULL; } -- cgit