forked from len0rd/rockbox
format() (and its alias vuprintf) return values are uncheck -> void
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28119 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
cc6ef19dd9
commit
5a98ad2d7f
3 changed files with 8 additions and 12 deletions
|
@ -57,7 +57,6 @@ static int sprfunc(void *ptr, unsigned char letter)
|
|||
|
||||
int snprintf(char *buf, size_t size, const char *fmt, ...)
|
||||
{
|
||||
bool ok;
|
||||
va_list ap;
|
||||
struct for_snprintf pr;
|
||||
|
||||
|
@ -66,7 +65,7 @@ int snprintf(char *buf, size_t size, const char *fmt, ...)
|
|||
pr.max = size;
|
||||
|
||||
va_start(ap, fmt);
|
||||
ok = format(sprfunc, &pr, fmt, ap);
|
||||
format(sprfunc, &pr, fmt, ap);
|
||||
va_end(ap);
|
||||
|
||||
/* make sure it ends with a trailing zero */
|
||||
|
@ -77,14 +76,13 @@ int snprintf(char *buf, size_t size, const char *fmt, ...)
|
|||
|
||||
int vsnprintf(char *buf, size_t size, const char *fmt, va_list ap)
|
||||
{
|
||||
bool ok;
|
||||
struct for_snprintf pr;
|
||||
|
||||
pr.ptr = (unsigned char *)buf;
|
||||
pr.bytes = 0;
|
||||
pr.max = size;
|
||||
|
||||
ok = format(sprfunc, &pr, fmt, ap);
|
||||
format(sprfunc, &pr, fmt, ap);
|
||||
|
||||
/* make sure it ends with a trailing zero */
|
||||
pr.ptr[(pr.bytes < pr.max) ? 0 : -1] = '\0';
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue