code lint and optimize code style

This commit is contained in:
Nick Peng
2019-02-22 23:14:42 +08:00
parent c0c6fde39d
commit 7828f0ec27
28 changed files with 705 additions and 513 deletions

View File

@@ -48,7 +48,7 @@ format: Log formats
#ifndef BASE_FILE_NAME
#define BASE_FILE_NAME __FILE__
#endif
#define tlog(level, format, ...) tlog_ext(level, BASE_FILE_NAME, __LINE__, __func__, 0, format, ##__VA_ARGS__)
#define tlog(level, format, ...) tlog_ext(level, BASE_FILE_NAME, __LINE__, __func__, NULL, format, ##__VA_ARGS__)
extern int tlog_ext(tlog_level level, const char *file, int line, const char *func, void *userptr, const char *format, ...)
__attribute__((format(printf, 6, 7)));