From fa03f5ab0498c82adb0e1ca87d0b6885c72a9e9c Mon Sep 17 00:00:00 2001 From: zogodo <742782908@qq.com> Date: Fri, 6 Dec 2019 15:32:00 +0800 Subject: [PATCH] Update web_log.h --- TC1/http_server/web_log.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/TC1/http_server/web_log.h b/TC1/http_server/web_log.h index 385a8bb..ba2a384 100644 --- a/TC1/http_server/web_log.h +++ b/TC1/http_server/web_log.h @@ -10,9 +10,9 @@ typedef struct void SetLogRecord(LogRecord* lr, char* log); char* GetLogRecord(int idx); -#define os_log(format, ...) \ - char* log = malloc(sizeof(char)*LOG_LEN); \ - snprintf(log, LOG_LEN, format, ##__VA_ARGS__); \ - SetLogRecord(log_record, log); \ - custom_log("WIFI", format, ##__VA_ARGS__) \ +#define os_log(format, ...) \ + char* log = (char*)malloc(sizeof(char)*LOG_LEN); \ + snprintf(log, LOG_LEN, format, ##__VA_ARGS__); \ + SetLogRecord(log_record, log); \ + custom_log("WIFI", format, ##__VA_ARGS__) \