(yow): Use EXIT_FAILURE in case of memory error.
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);
buf = (char *) malloc(bufsize);
if (buf == (char *)0) {
fprintf(stderr, "yow: virtual memory exhausted\n");
- exit (3);
+ exit (EXIT_FAILURE);
}
buf[i++] = c;
buf = (char *) realloc(buf, bufsize);
if (buf == (char *)0) {
fprintf(stderr, "yow: virtual memory exhausted\n");
- exit (3);
+ exit (EXIT_FAILURE);
}
}
}