mirror of
https://github.com/u-boot/u-boot.git
synced 2025-05-08 10:39:08 +00:00
Make *printf() return "int" instead of "void"
Change the return type of the *printf() functions to the standard "int"; no changes are needed but returning the already available length count. This will save a few additional strlen() calls later... Signed-off-by: Wolfgang Denk <wd@denx.de>
This commit is contained in:
parent
c0c15379e2
commit
d9c27253ce
4 changed files with 18 additions and 12 deletions
|
@ -37,7 +37,7 @@
|
|||
/*
|
||||
* printf() and vprintf() are stolen from u-boot/common/console.c
|
||||
*/
|
||||
void printf (const char *fmt, ...)
|
||||
int printf (const char *fmt, ...)
|
||||
{
|
||||
va_list args;
|
||||
uint i;
|
||||
|
@ -53,9 +53,10 @@ void printf (const char *fmt, ...)
|
|||
|
||||
/* Print the string */
|
||||
ub_puts (printbuffer);
|
||||
return i;
|
||||
}
|
||||
|
||||
void vprintf (const char *fmt, va_list args)
|
||||
int vprintf (const char *fmt, va_list args)
|
||||
{
|
||||
uint i;
|
||||
char printbuffer[256];
|
||||
|
@ -67,6 +68,7 @@ void vprintf (const char *fmt, va_list args)
|
|||
|
||||
/* Print the string */
|
||||
ub_puts (printbuffer);
|
||||
return i;
|
||||
}
|
||||
|
||||
void putc (const char c)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue