1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-15 10:30:25 -08:00

(setup_yow): Use EXIT_FAILURE in case no separators found.

(yow): Use EXIT_FAILURE in case of memory error.
This commit is contained in:
Thien-Thi Nguyen 2005-05-25 14:24:26 +00:00
parent fe8ada6bbb
commit dcb361bef8
2 changed files with 8 additions and 3 deletions

View file

@ -1,3 +1,8 @@
2005-05-25 Thien-Thi Nguyen <ttn@gnu.org>
* yow.c (setup_yow): Use EXIT_FAILURE in case no separators found.
(yow): Use EXIT_FAILURE in case of memory error.
2005-03-17 Thien-Thi Nguyen <ttn@gnu.org>
* emacsclient.c (main): Use EXIT_SUCCESS.

View file

@ -104,7 +104,7 @@ setup_yow(fp)
while ((c = getc(fp)) != SEP) {
if (c == EOF) {
fprintf(stderr, "yow: file contains no separators\n");
exit(2);
exit(EXIT_FAILURE);
}
}
header_len = ftell(fp);
@ -157,7 +157,7 @@ yow (fp)
buf = (char *) malloc(bufsize);
if (buf == (char *)0) {
fprintf(stderr, "yow: virtual memory exhausted\n");
exit (3);
exit (EXIT_FAILURE);
}
buf[i++] = c;
@ -170,7 +170,7 @@ yow (fp)
buf = (char *) realloc(buf, bufsize);
if (buf == (char *)0) {
fprintf(stderr, "yow: virtual memory exhausted\n");
exit (3);
exit (EXIT_FAILURE);
}
}
}