diff options
author | Wolfgang Denk <wd@denx.de> | 2010-06-20 17:14:14 +0200 |
---|---|---|
committer | Wolfgang Denk <wd@denx.de> | 2010-07-04 23:51:49 +0200 |
commit | d9c27253ce333e2086b2d758b42dc3ecb8b34c3d (patch) | |
tree | 259c764843e1109f07f3f82e4b6c34a8d1772775 /examples/api | |
parent | c0c15379e22b1006806c9219934415b84e8d338a (diff) | |
download | u-boot-d9c27253ce333e2086b2d758b42dc3ecb8b34c3d.zip u-boot-d9c27253ce333e2086b2d758b42dc3ecb8b34c3d.tar.gz u-boot-d9c27253ce333e2086b2d758b42dc3ecb8b34c3d.tar.bz2 |
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>
Diffstat (limited to 'examples/api')
-rw-r--r-- | examples/api/libgenwrap.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/examples/api/libgenwrap.c b/examples/api/libgenwrap.c index b435dde..9733bbc 100644 --- a/examples/api/libgenwrap.c +++ b/examples/api/libgenwrap.c @@ -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) |