diff --git a/control/common.h b/control/common.h index d68934a6cc77f28680bc84860c1d6ae7f1e8444d..888cdedf719475f12e6a72c140b276946674cb8b 100644 --- a/control/common.h +++ b/control/common.h @@ -119,19 +119,19 @@ void chameleon_pclag2z(CHAM_context_t *chamctxt); */ #if defined(__GNUC__) -static inline void chameleon_asprintf( char **strp, const char *fmt, ... ) __attribute__((format(printf,2,3))); +static inline int chameleon_asprintf( char **strp, const char *fmt, ... ) __attribute__((format(printf,2,3))); #endif -static inline void chameleon_asprintf( char **strp, const char *fmt, ... ) +static inline int chameleon_asprintf( char **strp, const char *fmt, ... ) { va_list ap; int rc; va_start( ap, fmt ); rc = asprintf( strp, fmt, ap ); - va_end(ap); + va_end( ap ); assert( rc != -1 ); - (void)rc; + return rc; } #ifdef __cplusplus