]> git.eshelyaron.com Git - emacs.git/commitdiff
(setup_yow): Use EXIT_FAILURE in case no separators found.
authorThien-Thi Nguyen <ttn@gnuvola.org>
Wed, 25 May 2005 14:21:54 +0000 (14:21 +0000)
committerThien-Thi Nguyen <ttn@gnuvola.org>
Wed, 25 May 2005 14:21:54 +0000 (14:21 +0000)
(yow): Use EXIT_FAILURE in case of memory error.

lib-src/yow.c

index 2892d76b56338d9f4c55f1b07b4ddf521e42ae11..4ae7c57da22d9a6d849ad5fc61c415cf39775ab2 100644 (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);
       }
     }
   }