(main): Arrange to exit unsuccessfully when stime fails.
authorJim Meyering <jim@meyering.net>
Fri, 11 Dec 1998 13:37:52 +0000 (13:37 +0000)
committerJim Meyering <jim@meyering.net>
Fri, 11 Dec 1998 13:37:52 +0000 (13:37 +0000)
From Andreas Schwab.

src/date.c

index bf5b565..79eaf4f 100644 (file)
@@ -344,7 +344,10 @@ argument must be a format string beginning with `+'."),
          /* Set the system clock to the specified date, then regardless of
             the success of that operation, format and print that date.  */
          if (stime (&when) == -1)
-           error (0, errno, _("cannot set date"));
+           {
+             error (0, errno, _("cannot set date"));
+             status = 1;
+           }
        }
 
       /* When given a universal time option, set TZ to UTC0 after