bugfix if fd is NULL
This commit is contained in:
parent
44587107ff
commit
8fd4887ddb
2
ii.c
2
ii.c
@ -221,7 +221,7 @@ static void print_out(char *channel, char *buf)
|
|||||||
time_t t = time(0);
|
time_t t = time(0);
|
||||||
|
|
||||||
create_filepath(outfile, sizeof(outfile), channel, "out");
|
create_filepath(outfile, sizeof(outfile), channel, "out");
|
||||||
out = fopen(outfile, "a");
|
if(!(out = fopen(outfile, "a"))) return;
|
||||||
strftime(buft, sizeof(buft), "%F %R", localtime(&t));
|
strftime(buft, sizeof(buft), "%F %R", localtime(&t));
|
||||||
fprintf(out, "%s %s\n", buft, buf);
|
fprintf(out, "%s %s\n", buft, buf);
|
||||||
fclose(out);
|
fclose(out);
|
||||||
|
Loading…
Reference in New Issue
Block a user