Fix type mismatches

Thanks to Random832 for the patch.
This commit is contained in:
sin
2015-11-26 10:24:08 +00:00
parent 41a9742037
commit 1be832320c
2 changed files with 3 additions and 3 deletions

4
time.c
View File

@@ -36,7 +36,7 @@ main(int argc, char *argv[])
if ((ticks = sysconf(_SC_CLK_TCK)) <= 0)
eprintf("sysconf _SC_CLK_TCK:");
if ((r0 = times(&tms)) < 0)
if ((r0 = times(&tms)) == (clock_t)-1)
eprintf("times:");
switch ((pid = fork())) {
@@ -52,7 +52,7 @@ main(int argc, char *argv[])
}
waitpid(pid, &status, 0);
if ((r1 = times(&tms)) < 0)
if ((r1 = times(&tms)) == (clock_t)-1)
eprintf("times:");
if (WIFSIGNALED(status)) {