aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlfonso Gregory <gfunni234@gmail.com>2023-06-28 22:20:33 +0000
committerWarner Losh <imp@FreeBSD.org>2023-06-28 22:26:06 +0000
commit27cebb4eac3d03b81defa2785eae350f6caca2c7 (patch)
tree2f7e84cdc6ef6cb42fd888f8970c342d4a820914
parent430168942f2bf68b0230906a658a0ceb7acceef2 (diff)
downloadsrc-27cebb4eac3d03b81defa2785eae350f6caca2c7.tar.gz
src-27cebb4eac3d03b81defa2785eae350f6caca2c7.zip
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
-rw-r--r--sbin/newfs/mkfs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sbin/newfs/mkfs.c b/sbin/newfs/mkfs.c
index 28b02d250e17..85137c7881f9 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++);