From 7e8e45766b6fbf8c3ea443646af259f2943e4ef2 Mon Sep 17 00:00:00 2001 From: graham.gower@gmail.com Date: Thu, 18 Nov 2010 22:55:52 -0500 Subject: Rewrite sprintf_alloc. The example in printf(3) that this was taken from should not be used as it ignores negative return codes from vsnprintf, instead allocating more memory. Given an error from vsnprintf, this would loop until the process' virtual memory is exhausted. So we just exit in the event of a problem instead. git-svn-id: http://opkg.googlecode.com/svn/trunk@581 e8e0d7a0-c8d9-11dd-a880-a1081c7ac358 --- (limited to 'libopkg/sprintf_alloc.h') diff --git a/libopkg/sprintf_alloc.h b/libopkg/sprintf_alloc.h index 3d68d69..bcf42a4 100644 --- a/libopkg/sprintf_alloc.h +++ b/libopkg/sprintf_alloc.h @@ -18,6 +18,6 @@ #ifndef SPRINTF_ALLOC_H #define SPRINTF_ALLOC_H -int sprintf_alloc(char **str, const char *fmt, ...); +void sprintf_alloc(char **str, const char *fmt, ...); #endif -- cgit v0.9.1