From b5e668bcbd82421ac3a359b135911153d12c1236 Mon Sep 17 00:00:00 2001 From: Markus Uhlin Date: Mon, 25 Dec 2023 18:58:33 +0100 Subject: Reformatted count_lines() --- FICS/utils.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/FICS/utils.c b/FICS/utils.c index 1a4d5dc..e31ab6a 100644 --- a/FICS/utils.c +++ b/FICS/utils.c @@ -49,15 +49,15 @@ struct t_dirs { PRIVATE char** t_buffer = NULL; PRIVATE int t_buffersize = 0; -PUBLIC int count_lines(FILE *fp) +PUBLIC int +count_lines(FILE *fp) { - int c, nl = 0; - - while ((c = fgetc(fp)) != EOF) - if (c == '\n') - ++nl; + int c, nl = 0; - return nl; + while ((c = fgetc(fp)) != EOF) + if (c == '\n') + ++nl; + return nl; } PUBLIC int -- cgit v1.2.3