mirror of
https://git.zx2c4.com/cgit
synced 2024-11-26 02:18:42 +00:00
Merge branch 'stable'
This commit is contained in:
commit
523c133e2e
@ -42,6 +42,7 @@ char *readfile(const char *path)
|
|||||||
|
|
||||||
if (!(f = fopen(path, "r")))
|
if (!(f = fopen(path, "r")))
|
||||||
return NULL;
|
return NULL;
|
||||||
|
buf[0] = 0;
|
||||||
fgets(buf, MAX_PATH, f);
|
fgets(buf, MAX_PATH, f);
|
||||||
fclose(f);
|
fclose(f);
|
||||||
return buf;
|
return buf;
|
||||||
|
@ -23,6 +23,7 @@ time_t read_agefile(char *path)
|
|||||||
|
|
||||||
if (!(f = fopen(path, "r")))
|
if (!(f = fopen(path, "r")))
|
||||||
return -1;
|
return -1;
|
||||||
|
buf[0] = 0;
|
||||||
if (fgets(buf, sizeof(buf), f) == NULL)
|
if (fgets(buf, sizeof(buf), f) == NULL)
|
||||||
return -1;
|
return -1;
|
||||||
fclose(f);
|
fclose(f);
|
||||||
|
Loading…
Reference in New Issue
Block a user