From 841fb3c2b5fc1472e4d7ecf67ffbfec2c7075f56 Mon Sep 17 00:00:00 2001 From: Markus Uhlin Date: Mon, 25 Dec 2023 17:02:33 +0100 Subject: Reformatted file_exists() --- FICS/utils.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/FICS/utils.c b/FICS/utils.c index 542638b..441ec65 100644 --- a/FICS/utils.c +++ b/FICS/utils.c @@ -840,15 +840,15 @@ PUBLIC int available_space(void) #endif } -PUBLIC int file_exists(char *fname) +PUBLIC int +file_exists(char *fname) { - FILE *fp; + FILE *fp; - fp = fopen(fname, "r"); - if (!fp) - return 0; - fclose(fp); - return 1; + if ((fp = fopen(fname, "r")) == NULL) + return 0; + fclose(fp); + return 1; } PUBLIC char * -- cgit v1.2.3