提交 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
return;
}
time_t logTime;
time(&logTime);
struct tm *t = gmtime(&logTime);
time_t second = time(0);
struct tm *t = localtime(&second);
if (t == NULL) {
printf("time is NULL.\n");
return;
......
......@@ -329,10 +329,14 @@ static void DoCopy(const char* cmdContent)
out:
FreeCmd(&ctx);
ctx = NULL;
close(srcFd);
srcFd = -1;
close(dstFd);
dstFd = -1;
if (srcFd >= 0) {
close(srcFd);
srcFd = -1;
}
if (dstFd >= 0) {
close(dstFd);
dstFd = -1;
}
return;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册