summaryrefslogtreecommitdiffstats
path: root/libopkg
diff options
context:
space:
mode:
Diffstat (limited to 'libopkg')
-rw-r--r--libopkg/sprintf_alloc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libopkg/sprintf_alloc.c b/libopkg/sprintf_alloc.c
index e2513ec..aef8e06 100644
--- a/libopkg/sprintf_alloc.c
+++ b/libopkg/sprintf_alloc.c
@@ -23,9 +23,9 @@ sprintf_alloc(char **str, const char *fmt, ...)
{
va_list ap;
int n;
- unsigned int size = 1;
+ unsigned int size = 0;
- *str = xcalloc(1, size);
+ *str = NULL;
for (;;) {
va_start(ap, fmt);