From 27cebb4eac3d03b81defa2785eae350f6caca2c7 Mon Sep 17 00:00:00 2001 From: Alfonso Gregory Date: Wed, 28 Jun 2023 16:20:33 -0600 Subject: [PATCH] newfs: nextnum should be a u_int32_t, not an int The function that uses nextnum expects to return a u_int32_t, not a mere int, so let's make nextnum a u_int32_t instead. Note: retained current u_int32_t style, since the rest of the file uses it. Reviewed by: imp, mckusick Pull Request: https://github.com/freebsd/freebsd-src/pull/734 --- sbin/newfs/mkfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sbin/newfs/mkfs.c b/sbin/newfs/mkfs.c index 28b02d250e1..85137c7881f 100644 --- a/sbin/newfs/mkfs.c +++ b/sbin/newfs/mkfs.c @@ -1230,7 +1230,7 @@ ilog2(int val) static u_int32_t newfs_random(void) { - static int nextnum = 1; + static u_int32_t nextnum = 1; if (Rflag) return (nextnum++);