git: 27cebb4eac3d - main - newfs: nextnum should be a u_int32_t, not an int

From: Warner Losh <imp_at_FreeBSD.org>
Date: Wed, 28 Jun 2023 22:38:52 UTC
The branch main has been updated by imp:

URL: https://cgit.FreeBSD.org/src/commit/?id=27cebb4eac3d03b81defa2785eae350f6caca2c7

commit 27cebb4eac3d03b81defa2785eae350f6caca2c7
Author:     Alfonso Gregory <gfunni234@gmail.com>
AuthorDate: 2023-06-28 22:20:33 +0000
Commit:     Warner Losh <imp@FreeBSD.org>
CommitDate: 2023-06-28 22:26:06 +0000

    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 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++);