From: Andreas Schwab Date: Sun, 14 Apr 2002 01:02:53 +0000 (+0000) Subject: (read_score): Fix type of second parameter X-Git-Tag: ttn-vms-21-2-B4~15634 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=7605f1bd6c4cdd4a572e32567e6b470423edae77;p=emacs.git (read_score): Fix type of second parameter of getdelim to be of type size_t instead of int. Use 0 instead of ESUCCES. --- diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog index e480cf1ff47..51534cd53ab 100644 --- a/lib-src/ChangeLog +++ b/lib-src/ChangeLog @@ -1,3 +1,9 @@ +2002-04-14 Andreas Schwab + + * 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 * update-game-score.c: (toplevel): Include stdarg.h. diff --git a/lib-src/update-game-score.c b/lib-src/update-game-score.c index 31d3737d95e..2f49197a6dc 100644 --- a/lib-src/update-game-score.c +++ b/lib-src/update-game-score.c @@ -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';