(read_score): Fix type of second parameter
of getdelim to be of type size_t instead of int. Use 0 instead of ESUCCES.
This commit is contained in:
parent
744ee133cd
commit
7605f1bd6c
2 changed files with 9 additions and 3 deletions
|
@ -1,3 +1,9 @@
|
|||
2002-04-14 Andreas Schwab <schwab@suse.de>
|
||||
|
||||
* update-game-score.c (read_score): Fix type of second parameter
|
||||
of getdelim to be of type size_t instead of int. Use 0 instead of
|
||||
ESUCCES.
|
||||
|
||||
2002-04-10 Colin Walters <walters@verbum.org>
|
||||
|
||||
* update-game-score.c: (toplevel): Include stdarg.h.
|
||||
|
|
|
@ -249,7 +249,7 @@ read_score(FILE *f, struct score_entry *score)
|
|||
ungetc(c, f);
|
||||
#ifdef HAVE_GETDELIM
|
||||
{
|
||||
int count = 0;
|
||||
size_t count = 0;
|
||||
if (getdelim(&score->username, &count, ' ', f) < 1
|
||||
|| score->username == NULL)
|
||||
return -1;
|
||||
|
@ -279,9 +279,9 @@ read_score(FILE *f, struct score_entry *score)
|
|||
#endif
|
||||
#ifdef HAVE_GETLINE
|
||||
score->data = NULL;
|
||||
errno = ESUCCES;
|
||||
errno = 0;
|
||||
{
|
||||
int len;
|
||||
size_t len;
|
||||
if (getline(&score->data, &len, f) < 0)
|
||||
return -1;
|
||||
score->data[strlen(score->data)-1] = '\0';
|
||||
|
|
Loading…
Add table
Reference in a new issue