sbase

suckless unix tools
git clone git://git.2f30.org/sbase
Log | Files | Refs | README | LICENSE

commit 1be832320cfcf14f5e544ea0d6d791255f7b0c2c
parent 41a974203782cf6282c203fd7c16279afc0a10b3
Author: sin <sin@2f30.org>
Date:   Thu, 26 Nov 2015 10:24:08 +0000

Fix type mismatches

Thanks to Random832 for the patch.

Diffstat:
Mdu.c | 2+-
Mtime.c | 4++--
2 files changed, 3 insertions(+), 3 deletions(-)

diff --git 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 @@ -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)) {