提交 78941a1c 编写于 作者: Z zhong_ning

fix code style

Signed-off-by: Nzhong_ning <zhong_ning@hoperun.com>
上级 e403d4f7
...@@ -71,9 +71,8 @@ void InitLog(const char *tag, InitLogLevel logLevel, const char *fileName, int l ...@@ -71,9 +71,8 @@ void InitLog(const char *tag, InitLogLevel logLevel, const char *fileName, int l
return; return;
} }
time_t logTime; time_t second = time(0);
time(&logTime); struct tm *t = localtime(&second);
struct tm *t = gmtime(&logTime);
if (t == NULL) { if (t == NULL) {
printf("time is NULL.\n"); printf("time is NULL.\n");
return; return;
......
...@@ -329,10 +329,14 @@ static void DoCopy(const char* cmdContent) ...@@ -329,10 +329,14 @@ static void DoCopy(const char* cmdContent)
out: out:
FreeCmd(&ctx); FreeCmd(&ctx);
ctx = NULL; ctx = NULL;
close(srcFd); if (srcFd >= 0) {
srcFd = -1; close(srcFd);
close(dstFd); srcFd = -1;
dstFd = -1; }
if (dstFd >= 0) {
close(dstFd);
dstFd = -1;
}
return; return;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册