diff --git a/cache/src/tango_cache_tools.cpp b/cache/src/tango_cache_tools.cpp index 0b78468..e22a8b9 100644 --- a/cache/src/tango_cache_tools.cpp +++ b/cache/src/tango_cache_tools.cpp @@ -220,7 +220,6 @@ int mkdir_according_path(const char * path) time_t expires_hdr2timestamp(const char *expires_val, int len) { struct tm tm; - time_t expire; while(len > 0 && (*expires_val==' '||*expires_val=='\t'||*expires_val=='\r'||*expires_val=='\n')) { @@ -238,8 +237,7 @@ time_t expires_hdr2timestamp(const char *expires_val, int len) return 0; } - expire = mktime(&tm); - return expire; + return mktime(&tm); } //将本地时间戳转换为GMT时间字符串