summaryrefslogtreecommitdiffstats
path: root/bin/date/date.c
diff options
context:
space:
mode:
Diffstat (limited to 'bin/date/date.c')
-rw-r--r--bin/date/date.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/bin/date/date.c b/bin/date/date.c
index 1e9f281..58a9afb 100644
--- a/bin/date/date.c
+++ b/bin/date/date.c
@@ -137,7 +137,7 @@ main(int argc, char *argv[])
* If -d or -t, set the timezone or daylight savings time; this
* doesn't belong here; the kernel should not know about either.
*/
- if (set_timezone && settimeofday((struct timeval *)NULL, &tz))
+ if (set_timezone && settimeofday(NULL, &tz) != 0)
err(1, "settimeofday (timezone)");
if (!rflag && time(&tval) == -1)
@@ -273,14 +273,14 @@ setthetime(const char *fmt, const char *p, int jflag, int nflag)
/* set the time */
if (nflag || netsettime(tval)) {
utx.ut_type = OLD_TIME;
- gettimeofday(&utx.ut_tv, NULL);
+ (void)gettimeofday(&utx.ut_tv, NULL);
pututxline(&utx);
tv.tv_sec = tval;
tv.tv_usec = 0;
- if (settimeofday(&tv, (struct timezone *)NULL))
+ if (settimeofday(&tv, NULL) != 0)
err(1, "settimeofday (timeval)");
utx.ut_type = NEW_TIME;
- gettimeofday(&utx.ut_tv, NULL);
+ (void)gettimeofday(&utx.ut_tv, NULL);
pututxline(&utx);
}
OpenPOWER on IntegriCloud