Remove unused callbacks, a legacy of the now removed ipkg API.
[oweals/opkg-lede.git] / libopkg / sprintf_alloc.c
index 1d53b2053bbcc7f4c2b6f035302d3f800e3c4a04..30ab033d257dabc8f378125f853f1ed4039da8ca 100644 (file)
@@ -15,7 +15,7 @@
    GNU General Public License for more details.
 */
 
-#include "opkg.h"
+#include "includes.h"
 #include <stdarg.h>
 
 #include "sprintf_alloc.h"
@@ -44,7 +44,7 @@ int sprintf_alloc(char **str, const char *fmt, ...)
 
     /* ripped more or less straight out of PRINTF(3) */
 
-    if ((new_str = malloc(size)) == NULL) 
+    if ((new_str = calloc(1, size)) == NULL) 
       return -1;
 
     *str = new_str;