diff options
author | Markus Uhlin <markus@nifty-networks.net> | 2023-12-31 19:01:56 +0100 |
---|---|---|
committer | Markus Uhlin <markus@nifty-networks.net> | 2023-12-31 19:01:56 +0100 |
commit | c9e308b61de0def5ff2a42634368ad1fcc2cb2a4 (patch) | |
tree | b44b99dc29ba1607cd1822b3321e609386052c29 | |
parent | 10bb38eba257a361ae8d5410efc84eec0230e13f (diff) |
Switched to usage of 'sizeof'
-rw-r--r-- | FICS/playerdb.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/FICS/playerdb.c b/FICS/playerdb.c index 2765c8d..60fbc55 100644 --- a/FICS/playerdb.c +++ b/FICS/playerdb.c @@ -668,7 +668,7 @@ got_attr_value_player(int p, char *attr, char *value, FILE *fp, char *file) if (parray[p].num_plan > 0) { for (i = 0; i < parray[p].num_plan; i++) { - fgets(tmp, MAX_LINE_SIZE, fp); + fgets(tmp, sizeof tmp, fp); if (!(len = strlen(tmp))) { fprintf(stderr, "FICS: Error bad plan " @@ -691,7 +691,7 @@ got_attr_value_player(int p, char *attr, char *value, FILE *fp, char *file) if (parray[p].num_formula > 0) { for (i = 0; i < parray[p].num_formula; i++) { - fgets(tmp, MAX_LINE_SIZE, fp); + fgets(tmp, sizeof tmp, fp); if (!(len = strlen(tmp))) { fprintf(stderr, "FICS: Error bad " @@ -720,7 +720,7 @@ got_attr_value_player(int p, char *attr, char *value, FILE *fp, char *file) if (parray[p].numAlias > 0) { for (i = 0; i < parray[p].numAlias; i++) { - fgets(tmp, MAX_LINE_SIZE, fp); + fgets(tmp, sizeof tmp, fp); if (!(len = strlen(tmp))) { fprintf(stderr, "FICS: Error bad alias " @@ -750,7 +750,7 @@ got_attr_value_player(int p, char *attr, char *value, FILE *fp, char *file) i = atoi(value); while (i--) { - fgets(tmp, MAX_LINE_SIZE, fp); + fgets(tmp, sizeof tmp, fp); if (!(len = strlen(tmp)) || len == 1) { // blank lines // do occur! @@ -765,7 +765,7 @@ got_attr_value_player(int p, char *attr, char *value, FILE *fp, char *file) i = atoi(value); while (i--) { - fgets(tmp, MAX_LINE_SIZE, fp); + fgets(tmp, sizeof tmp, fp); if (!(len = strlen(tmp)) || len == 1) { // blank lines // do occur! @@ -780,7 +780,7 @@ got_attr_value_player(int p, char *attr, char *value, FILE *fp, char *file) i = atoi(value); while (i--) { - fgets(tmp, MAX_LINE_SIZE, fp); + fgets(tmp, sizeof tmp, fp); if (!(len = strlen(tmp)) || len == 1) { // blank lines // do occur! @@ -795,7 +795,7 @@ got_attr_value_player(int p, char *attr, char *value, FILE *fp, char *file) i = atoi(value); while (i--) { - fgets(tmp, MAX_LINE_SIZE, fp); + fgets(tmp, sizeof tmp, fp); if (!(len = strlen(tmp)) || len == 1) { // blank lines // do occur! |