diff options
Diffstat (limited to 'firmware/common/format.c')
-rw-r--r-- | firmware/common/format.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/firmware/common/format.c b/firmware/common/format.c index 240dd1ebd5..afe1010cfb 100644 --- a/firmware/common/format.c +++ b/firmware/common/format.c | |||
@@ -29,7 +29,7 @@ | |||
29 | 29 | ||
30 | static const char hexdigit[] = "0123456789ABCDEF"; | 30 | static const char hexdigit[] = "0123456789ABCDEF"; |
31 | 31 | ||
32 | int format( | 32 | void format( |
33 | /* call 'push()' for each output letter */ | 33 | /* call 'push()' for each output letter */ |
34 | int (*push)(void *userp, unsigned char data), | 34 | int (*push)(void *userp, unsigned char data), |
35 | void *userp, | 35 | void *userp, |
@@ -220,7 +220,6 @@ int format( | |||
220 | else | 220 | else |
221 | ok=push(userp, ch); | 221 | ok=push(userp, ch); |
222 | } | 222 | } |
223 | return ok; /* true means good */ | ||
224 | } | 223 | } |
225 | 224 | ||
226 | struct for_fprintf { | 225 | struct for_fprintf { |
@@ -244,7 +243,6 @@ static int fprfunc(void *pr, unsigned char letter) | |||
244 | 243 | ||
245 | int fdprintf(int fd, const char *fmt, ...) | 244 | int fdprintf(int fd, const char *fmt, ...) |
246 | { | 245 | { |
247 | bool ok; | ||
248 | va_list ap; | 246 | va_list ap; |
249 | struct for_fprintf fpr; | 247 | struct for_fprintf fpr; |
250 | 248 | ||
@@ -252,13 +250,13 @@ int fdprintf(int fd, const char *fmt, ...) | |||
252 | fpr.bytes=0; | 250 | fpr.bytes=0; |
253 | 251 | ||
254 | va_start(ap, fmt); | 252 | va_start(ap, fmt); |
255 | ok = format(fprfunc, &fpr, fmt, ap); | 253 | format(fprfunc, &fpr, fmt, ap); |
256 | va_end(ap); | 254 | va_end(ap); |
257 | 255 | ||
258 | return fpr.bytes; /* return 0 on error */ | 256 | return fpr.bytes; /* return 0 on error */ |
259 | } | 257 | } |
260 | 258 | ||
261 | int vuprintf(int (*push)(void *userp, unsigned char data), void *userp, const char *fmt, va_list ap) | 259 | void vuprintf(int (*push)(void *userp, unsigned char data), void *userp, const char *fmt, va_list ap) |
262 | { | 260 | { |
263 | return format(push, userp, fmt, ap); | 261 | format(push, userp, fmt, ap); |
264 | } | 262 | } |