diff options
| author | Andreas Schwab | 2002-04-14 01:02:53 +0000 |
|---|---|---|
| committer | Andreas Schwab | 2002-04-14 01:02:53 +0000 |
| commit | 7605f1bd6c4cdd4a572e32567e6b470423edae77 (patch) | |
| tree | d2d94eb6b2d319c3230b4aac57b2d75bc3907ecd /lib-src | |
| parent | 744ee133cdb52c5a4f559d09940622864b49f288 (diff) | |
| download | emacs-7605f1bd6c4cdd4a572e32567e6b470423edae77.tar.gz emacs-7605f1bd6c4cdd4a572e32567e6b470423edae77.zip | |
(read_score): Fix type of second parameter
of getdelim to be of type size_t instead of int. Use 0 instead of
ESUCCES.
Diffstat (limited to 'lib-src')
| -rw-r--r-- | lib-src/ChangeLog | 6 | ||||
| -rw-r--r-- | lib-src/update-game-score.c | 6 |
2 files changed, 9 insertions, 3 deletions
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 @@ | |||
| 1 | 2002-04-14 Andreas Schwab <schwab@suse.de> | ||
| 2 | |||
| 3 | * update-game-score.c (read_score): Fix type of second parameter | ||
| 4 | of getdelim to be of type size_t instead of int. Use 0 instead of | ||
| 5 | ESUCCES. | ||
| 6 | |||
| 1 | 2002-04-10 Colin Walters <walters@verbum.org> | 7 | 2002-04-10 Colin Walters <walters@verbum.org> |
| 2 | 8 | ||
| 3 | * update-game-score.c: (toplevel): Include stdarg.h. | 9 | * 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) | |||
| 249 | ungetc(c, f); | 249 | ungetc(c, f); |
| 250 | #ifdef HAVE_GETDELIM | 250 | #ifdef HAVE_GETDELIM |
| 251 | { | 251 | { |
| 252 | int count = 0; | 252 | size_t count = 0; |
| 253 | if (getdelim(&score->username, &count, ' ', f) < 1 | 253 | if (getdelim(&score->username, &count, ' ', f) < 1 |
| 254 | || score->username == NULL) | 254 | || score->username == NULL) |
| 255 | return -1; | 255 | return -1; |
| @@ -279,9 +279,9 @@ read_score(FILE *f, struct score_entry *score) | |||
| 279 | #endif | 279 | #endif |
| 280 | #ifdef HAVE_GETLINE | 280 | #ifdef HAVE_GETLINE |
| 281 | score->data = NULL; | 281 | score->data = NULL; |
| 282 | errno = ESUCCES; | 282 | errno = 0; |
| 283 | { | 283 | { |
| 284 | int len; | 284 | size_t len; |
| 285 | if (getline(&score->data, &len, f) < 0) | 285 | if (getline(&score->data, &len, f) < 0) |
| 286 | return -1; | 286 | return -1; |
| 287 | score->data[strlen(score->data)-1] = '\0'; | 287 | score->data[strlen(score->data)-1] = '\0'; |