From 0d95a8e54e425eff8451a2ee6ef251b0d8e4a647 Mon Sep 17 00:00:00 2001 From: zhengchao Date: Mon, 22 Oct 2018 15:43:57 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E5=86=99=E8=B6=8A=E7=95=8C?= =?UTF-8?q?=E9=97=AE=E9=A2=98=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- cache/src/tango_cache_pending.cpp | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/cache/src/tango_cache_pending.cpp b/cache/src/tango_cache_pending.cpp index 1caffbb..631f1a2 100644 --- a/cache/src/tango_cache_pending.cpp +++ b/cache/src/tango_cache_pending.cpp @@ -1,9 +1,10 @@ -#include"tango_cache_pending.h" -#include -#include -#include -#include -#include +#include "tango_cache_pending.h" +#include +#include +#include +#include +#include +#include time_t get_time_value(const char* field_value, const char* field_type) @@ -13,7 +14,7 @@ time_t get_time_value(const char* field_value, const char* field_type) field_value += strlen(field_type); field_value++; int len = strlen(field_value); - time_value = (char *)malloc(sizeof(char)*len); + time_value = ALLOC(char, len+1); int index = 0; while (field_value[index] != ',' && field_value[index] != '\r' && index < len) {