summaryrefslogtreecommitdiffstats
path: root/libopkg/sprintf_alloc.c
diff options
context:
space:
mode:
Diffstat (limited to 'libopkg/sprintf_alloc.c')
-rw-r--r--libopkg/sprintf_alloc.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/libopkg/sprintf_alloc.c b/libopkg/sprintf_alloc.c
index 7989493..2e3200b 100644
--- a/libopkg/sprintf_alloc.c
+++ b/libopkg/sprintf_alloc.c
@@ -24,14 +24,15 @@
int sprintf_alloc(char **str, const char *fmt, ...)
{
va_list ap;
- int n, size = 100;
+ int n;
+ unsigned size = 100;
if (!str) {
- fprintf(stderr, "Null string pointer passed to sprintf_alloc\n");
+ opkg_msg(ERROR, "Internal error: str=NULL.\n");
return -1;
}
if (!fmt) {
- fprintf(stderr, "Null fmt string passed to sprintf_alloc\n");
+ opkg_msg(ERROR, "Internal error: fmt=NULL.\n");
return -1;
}