Date: Sat, 8 Oct 2022 03:45:03 GMT From: Warner Losh <imp@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: 2da6a6b31d9c - main - nvmecontrol: use uintmax_t for a size Message-ID: <202210080345.2983j3lg070499@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by imp: URL: https://cgit.FreeBSD.org/src/commit/?id=2da6a6b31d9ce242151bf025a38ddd5c6887f0a3 commit 2da6a6b31d9ce242151bf025a38ddd5c6887f0a3 Author: Warner Losh <imp@FreeBSD.org> AuthorDate: 2022-10-08 03:41:02 +0000 Commit: Warner Losh <imp@FreeBSD.org> CommitDate: 2022-10-08 03:44:23 +0000 nvmecontrol: use uintmax_t for a size Use uintmax_t cast to print the size of the device for the non-humanize case to avoid issues with 32-bit longs. Fixes: 9c1bec9c21a2 Sponsored by: Netflix --- sbin/nvmecontrol/devlist.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sbin/nvmecontrol/devlist.c b/sbin/nvmecontrol/devlist.c index e9df5faadb12..61e6dd47ef8e 100644 --- a/sbin/nvmecontrol/devlist.c +++ b/sbin/nvmecontrol/devlist.c @@ -143,7 +143,7 @@ devlist(const struct cmd *f, int argc, char *argv[]) printf(" %10s (%s)\n", name, buf); } else { - printf(" %10s (%luMB)\n", name, size / 1024 / 1024); + printf(" %10s (%juMB)\n", name, (uintmax_t)size / 1024 / 1024); } }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202210080345.2983j3lg070499>