From b321f7532c2f3a1a00b4dfa121b950aff4f44f7d Mon Sep 17 00:00:00 2001 From: Markus Uhlin Date: Mon, 2 Dec 2024 14:01:54 +0100 Subject: Usage of sizeof --- FICS/playerdb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/FICS/playerdb.c b/FICS/playerdb.c index 59f7438..93c81e8 100644 --- a/FICS/playerdb.c +++ b/FICS/playerdb.c @@ -950,7 +950,7 @@ player_read(int p, char *name) parray[p].registered = 1; // Lets load the file - fgets(line, MAX_LINE_SIZE, fp); // Ok, so which version file? + fgets(line, sizeof line, fp); // Ok, so which version file? if (line[0] == 'v') sscanf(line, "%*c %d", &version); @@ -982,7 +982,7 @@ player_read(int p, char *name) value = eatwhite(value); stolower(attr); got_attr_value_player(p, attr, value, fp, fname); - fgets(line, MAX_LINE_SIZE, fp); + fgets(line, sizeof line, fp); } while (!feof(fp)); } -- cgit v1.2.3