summaryrefslogtreecommitdiff
path: root/usr.bin/fstat
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2019-02-05 02:17:33 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2019-02-05 02:17:33 +0000
commitaa13d2ec5555dbfdc371f1d865cddc5c3de5728e (patch)
tree4ed61809a72e33940f8487544c5fe67f3e30ee0b /usr.bin/fstat
parent7406246b8f0f96fc7d5884c1eba639bc65489ed2 (diff)
dev_t is signed to permit passing -1 as an invalid condition, but the
decomposition into major and minor is unsigned, so we should print them with %u instead of %d. ok guenther
Diffstat (limited to 'usr.bin/fstat')
-rw-r--r--usr.bin/fstat/fstat.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/fstat/fstat.c b/usr.bin/fstat/fstat.c
index 075d396300c..fe89940aa48 100644
--- a/usr.bin/fstat/fstat.c
+++ b/usr.bin/fstat/fstat.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: fstat.c,v 1.98 2019/01/28 17:49:50 martijn Exp $ */
+/* $OpenBSD: fstat.c,v 1.99 2019/02/05 02:17:32 deraadt Exp $ */
/*
* Copyright (c) 2009 Todd C. Miller <millert@openbsd.org>
@@ -467,7 +467,7 @@ vtrans(struct kinfo_file *kf)
}
if (nflg)
- (void)printf(" %2ld,%-2ld", (long)major(kf->va_fsid),
+ (void)printf(" %2lu,%-2lu", (long)major(kf->va_fsid),
(long)minor(kf->va_fsid));
else if (!(kf->v_flag & VCLONE))
(void)printf(" %-8s", kf->f_mntonname);
@@ -497,7 +497,7 @@ vtrans(struct kinfo_file *kf)
if (nflg || ((name = devname(kf->va_rdev,
kf->v_type == VCHR ? S_IFCHR : S_IFBLK)) == NULL))
- printf(" %2d,%-3d", major(kf->va_rdev), minor(kf->va_rdev));
+ printf(" %2u,%-3u", major(kf->va_rdev), minor(kf->va_rdev));
else
printf(" %7s", name);
if (oflg)