about summary refs log tree commit diff
path: root/io/test-utime.c
diff options
context:
space:
mode:
Diffstat (limited to 'io/test-utime.c')
-rw-r--r--io/test-utime.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/io/test-utime.c b/io/test-utime.c
index 8dbbcf990d..6828d00581 100644
--- a/io/test-utime.c
+++ b/io/test-utime.c
@@ -37,14 +37,14 @@ main (int argc, char *argv[])
   if (tmpnam (file) == 0)
     {
       perror ("tmpnam");
-      exit (1);
+      return 1;
     }
 
   fd = creat (file, 0666);
   if (fd < 0)
     {
       perror ("creat");
-      exit (1);
+      return 1;
     }
   close (fd);
 
@@ -55,14 +55,14 @@ main (int argc, char *argv[])
     {
       perror ("utime");
       remove (file);
-      exit (1);
+      return 1;
     }
 
   if (stat (file, &st))
     {
       perror ("stat");
       remove (file);
-      exit (1);
+      return 1;
     }
 
   /* Test utime with NULL.
@@ -73,14 +73,14 @@ main (int argc, char *argv[])
     {
       perror ("time");
       remove (file);
-      exit (1);
+      return 1;
     }
 
   if (utime (file, NULL))
     {
       perror ("utime NULL");
       remove (file);
-      exit (1);
+      return 1;
     }
 
   now2 = time (NULL);
@@ -88,14 +88,14 @@ main (int argc, char *argv[])
     {
       perror ("time");
       remove (file);
-      exit (1);
+      return 1;
     }
 
   if (stat (file, &stnow))
     {
       perror ("stat");
       remove (file);
-      exit (1);
+      return 1;
     }
 
   remove (file);
@@ -103,27 +103,27 @@ main (int argc, char *argv[])
   if (st.st_mtime != ut.modtime)
     {
       printf ("modtime %ld != %ld\n", st.st_mtime, ut.modtime);
-      exit (1);
+      return 1;
     }
 
   if (st.st_atime != ut.actime)
     {
       printf ("actime %ld != %ld\n", st.st_atime, ut.actime);
-      exit (1);
+      return 1;
     }
 
   if (stnow.st_mtime < now1 || stnow.st_mtime > now2)
     {
       printf ("modtime %ld <%ld >%ld\n", st.st_mtime, now1, now2);
-      exit (1);
+      return 1;
     }
 
   if (stnow.st_atime < now1 || stnow.st_atime > now2)
     {
       printf ("actime %ld <%ld >%ld\n", st.st_atime, now1, now2);
-      exit (1);
+      return 1;
     }
 
   puts ("Test succeeded.");
-  exit (0);
+  return 0;
 }