diff options
Diffstat (limited to 'bin')
-rw-r--r-- | bin/date/date.c | 8 | ||||
-rw-r--r-- | bin/dd/dd.c | 4 | ||||
-rw-r--r-- | bin/dd/misc.c | 2 |
3 files changed, 7 insertions, 7 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); } diff --git a/bin/dd/dd.c b/bin/dd/dd.c index 0bb43f7..637e0cc 100644 --- a/bin/dd/dd.c +++ b/bin/dd/dd.c @@ -232,8 +232,8 @@ setup(void) ctab = casetab; } - (void)gettimeofday(&tv, (struct timezone *)NULL); - st.start = tv.tv_sec + tv.tv_usec * 1e-6; + (void)gettimeofday(&tv, NULL); + st.start = tv.tv_sec + tv.tv_usec * 1e-6; } static void diff --git a/bin/dd/misc.c b/bin/dd/misc.c index 4f538bc..8edc5a5 100644 --- a/bin/dd/misc.c +++ b/bin/dd/misc.c @@ -59,7 +59,7 @@ summary(void) double secs; char buf[100]; - (void)gettimeofday(&tv, (struct timezone *)NULL); + (void)gettimeofday(&tv, NULL); secs = tv.tv_sec + tv.tv_usec * 1e-6 - st.start; if (secs < 1e-6) secs = 1e-6; |