commit 1be832320cfcf14f5e544ea0d6d791255f7b0c2c
Author:     sin <[email protected]>
AuthorDate: Thu Nov 26 10:24:08 2015 +0000
Commit:     sin <[email protected]>
CommitDate: Thu Nov 26 10:35:46 2015 +0000

    Fix type mismatches
    
    Thanks to Random832 for the patch.

diff --git a/du.c b/du.c
index 41e4380..3dc3545 100644
--- a/du.c
+++ b/du.c
@@ -25,7 +25,7 @@ printpath(off_t n, const char *path)
        if (hflag)
                printf("%s\t%s\n", humansize(n * blksize), path);
        else
-               printf("%ju\t%s\n", n, path);
+               printf("%jd\t%s\n", (intmax_t)n, path);
 }
 
 static off_t
diff --git a/time.c b/time.c
index 4af0352..60a8c8d 100644
--- a/time.c
+++ b/time.c
@@ -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)) {

Reply via email to