提交 947f2a4e 编写于 作者: F fang

return if fail to open file, otherwise coredump

上级 8eeb9500
......@@ -351,6 +351,11 @@ int main(int argc, char *argv[]) {
}
FILE *fp = fopen(arguments.output_file, "a");
if (NULL == fp) {
fprintf(stderr, "Failed to open %s for writing\n", arguments.output_file);
return 1;
};
time_t tTime = time(NULL);
struct tm tm = *localtime(&tTime);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册