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 /include | |
| parent | c0c15379e22b1006806c9219934415b84e8d338a (diff) | |
| download | olio-uboot-2014.01-d9c27253ce333e2086b2d758b42dc3ecb8b34c3d.tar.xz olio-uboot-2014.01-d9c27253ce333e2086b2d758b42dc3ecb8b34c3d.zip | |
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 'include')
| -rw-r--r-- | include/common.h | 8 | ||||
| -rw-r--r-- | include/exports.h | 4 | 
2 files changed, 6 insertions, 6 deletions
| diff --git a/include/common.h b/include/common.h index 8bca04fdd..48f6a1a07 100644 --- a/include/common.h +++ b/include/common.h @@ -663,7 +663,7 @@ int	disable_ctrlc (int);	/* 1 to disable, 0 to enable Control-C detect */   * STDIO based functions (can always be used)   */  /* serial stuff */ -void	serial_printf (const char *fmt, ...) +int	serial_printf (const char *fmt, ...)  		__attribute__ ((format (__printf__, 1, 2)));  /* stdin */  int	getc(void); @@ -672,9 +672,9 @@ int	tstc(void);  /* stdout */  void	putc(const char c);  void	puts(const char *s); -void	printf(const char *fmt, ...) +int	printf(const char *fmt, ...)  		__attribute__ ((format (__printf__, 1, 2))); -void	vprintf(const char *fmt, va_list args); +int	vprintf(const char *fmt, va_list args);  /* stderr */  #define eputc(c)		fputc(stderr, c) @@ -689,7 +689,7 @@ void	vprintf(const char *fmt, va_list args);  #define stderr		2  #define MAX_FILES	3 -void	fprintf(int file, const char *fmt, ...) +int	fprintf(int file, const char *fmt, ...)  		__attribute__ ((format (__printf__, 2, 3)));  void	fputs(int file, const char *s);  void	fputc(int file, const char c); diff --git a/include/exports.h b/include/exports.h index c3a5d2f32..9588bc94e 100644 --- a/include/exports.h +++ b/include/exports.h @@ -11,14 +11,14 @@ int  getc(void);  int  tstc(void);  void putc(const char);  void puts(const char*); -void printf(const char* fmt, ...); +int printf(const char* fmt, ...);  void install_hdlr(int, interrupt_handler_t*, void*);  void free_hdlr(int);  void *malloc(size_t);  void free(void*);  void __udelay(unsigned long);  unsigned long get_timer(unsigned long); -void vprintf(const char *, va_list); +int vprintf(const char *, va_list);  void do_reset (void);  unsigned long simple_strtoul(const char *cp,char **endp,unsigned int base);  char *getenv (char *name); |