[hackers] [sbase] Fix type mismatches || sin

From: <git_AT_suckless.org>
Date: Thu, 26 Nov 2015 11:35:52 +0100 (CET)

commit 1be832320cfcf14f5e544ea0d6d791255f7b0c2c
Author: sin <sin_AT_2f30.org>
AuthorDate: Thu Nov 26 10:24:08 2015 +0000
Commit: sin <sin_AT_2f30.org>
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
_AT_@ -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
_AT_@ -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())) {
_AT_@ -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)) {
Received on Thu Nov 26 2015 - 11:35:52 CET

This archive was generated by hypermail 2.3.0 : Thu Nov 26 2015 - 11:36:13 CET