diff --git a/src/debug.cpp b/src/debug.cpp index fe1d90e25..83d04f86b 100644 --- a/src/debug.cpp +++ b/src/debug.cpp @@ -86,12 +86,12 @@ static void _dprintf(const char *format, ...) #endif /* WIN32 */ } -int log_vprintf(int level, const char *format, va_list ap) +void log_vprintf(int level, const char *format, va_list ap) { va_list aq; if (log_level < level) { - return 0; + return; } // get number of required bytes @@ -122,9 +122,7 @@ int log_vprintf(int level, const char *format, va_list ap) } else { prune_ansi_sequences_inplace(buf.get()); } - int ret = buf.get().size(); buf.submit(); - return ret; } void log_msg(int level, const char *format, ...) { @@ -132,7 +130,6 @@ void log_msg(int level, const char *format, ...) { va_start(ap, format); log_vprintf(level, format, ap); va_end(ap); - } void log_msg_once(int level, uint32_t id, const char *msg, ...) { diff --git a/src/debug.h b/src/debug.h index 297cdc417..f265b9920 100644 --- a/src/debug.h +++ b/src/debug.h @@ -92,7 +92,7 @@ void debug_file_dump(const char *key, void (*serialize)(const void *data, FILE * ///#define debug_msg(...) log_msg(LOG_LEVEL_DEBUG, "[pid/%d +%d %s] ", getpid(), __LINE__, __FILE__), log_msg(LOG_LEVEL_DEBUG, __VA_ARGS__) #define debug_msg(...) log_msg(LOG_LEVEL_DEBUG, __VA_ARGS__) void log_msg(int log_level, const char *format, ...) ATTRIBUTE(format (printf, 2, 3)); -int log_vprintf(int level, const char *format, va_list ap); +void log_vprintf(int level, const char *format, va_list ap); void log_msg_once(int log_level, uint32_t id, const char *msg, ...) ATTRIBUTE(format (printf, 3, 4));; void log_perror(int log_level, const char *msg);