changeset 62694:00adf45090ee

(setup_yow): Use EXIT_FAILURE in case no separators found. (yow): Use EXIT_FAILURE in case of memory error.
author Thien-Thi Nguyen <ttn@gnuvola.org>
date Wed, 25 May 2005 14:16:31 +0000
parents 368b11560704
children b47fe7545b02
files lib-src/yow.c
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/lib-src/yow.c	Wed May 25 14:09:14 2005 +0000
+++ b/lib-src/yow.c	Wed May 25 14:16:31 2005 +0000
@@ -104,7 +104,7 @@
   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 @@
   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 @@
       buf = (char *) realloc(buf, bufsize);
       if (buf == (char *)0) {
 	fprintf(stderr, "yow: virtual memory exhausted\n");
-	exit (3);
+	exit (EXIT_FAILURE);
       }
     }
   }