summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Peach <jpeach@samba.org>2006-02-09 00:49:03 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 13:51:52 -0500
commitb56dab83a4537175b998b137e7ea2f2558042593 (patch)
tree3553d36be212994ce60e15ec96a7291ffc29d27f
parentf9f55ad5fcda943f6747d6bef72f6d9d00a263c4 (diff)
downloadsamba-b56dab83a4537175b998b137e7ea2f2558042593.tar.gz
samba-b56dab83a4537175b998b137e7ea2f2558042593.tar.bz2
samba-b56dab83a4537175b998b137e7ea2f2558042593.zip
r13400: Only return NULL from talloc_asprintf if vsnprintf returns an
error (ie. zero is not an error). (This used to be commit 1ab4674196b9df0b2b7b6eb4991358cc2f86c0d9)
-rw-r--r--source4/lib/talloc/talloc.c2
1 files changed, 1 insertions, 1 deletions
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;
}