diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2014-10-26 10:17:14 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2014-10-26 10:17:14 +0000 |
commit | 6f20fa7916b73f30337a6b411d64e4b6fd65d5cc (patch) | |
tree | 608554511e4dfd72eec396657df5c62eea8a0d62 /os/various/chprintf.h | |
parent | da0a231bbcac124415c001ae59a576d5cefeb07b (diff) | |
download | ChibiOS-6f20fa7916b73f30337a6b411d64e4b6fd65d5cc.tar.gz ChibiOS-6f20fa7916b73f30337a6b411d64e4b6fd65d5cc.tar.bz2 ChibiOS-6f20fa7916b73f30337a6b411d64e4b6fd65d5cc.zip |
Again #538.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@7422 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/various/chprintf.h')
-rw-r--r-- | os/various/chprintf.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/os/various/chprintf.h b/os/various/chprintf.h index c9bd3d91f..5d624a5f1 100644 --- a/os/various/chprintf.h +++ b/os/various/chprintf.h @@ -37,7 +37,7 @@ #ifdef __cplusplus
extern "C" {
#endif
- void chvprintf(BaseSequentialStream *chp, const char *fmt, va_list ap);
+ int chvprintf(BaseSequentialStream *chp, const char *fmt, va_list ap);
int chsnprintf(char *str, size_t size, const char *fmt, ...);
#ifdef __cplusplus
}
@@ -66,12 +66,15 @@ extern "C" { *
* @api
*/
-static inline void chprintf(BaseSequentialStream *chp, const char *fmt, ...) {
+static inline int chprintf(BaseSequentialStream *chp, const char *fmt, ...) {
va_list ap;
+ int formatted_bytes;
va_start(ap, fmt);
- chvprintf(chp, fmt, ap);
+ formatted_bytes = chvprintf(chp, fmt, ap);
va_end(ap);
+
+ return formatted_bytes;
}
#endif /* _CHPRINTF_H_ */
|