git: 92f2a4c820fe - main - compat_freebsd4: Add const qualifier to the local variable s inside function freebsd4_uname()

From: Zhenlei Huang <zlei_at_FreeBSD.org>
Date: Mon, 20 May 2024 04:04:01 UTC
The branch main has been updated by zlei:

URL: https://cgit.FreeBSD.org/src/commit/?id=92f2a4c820fea9efcb6ee6a7029495c8152958c1

commit 92f2a4c820fea9efcb6ee6a7029495c8152958c1
Author:     Zhenlei Huang <zlei@FreeBSD.org>
AuthorDate: 2024-05-20 04:02:32 +0000
Commit:     Zhenlei Huang <zlei@FreeBSD.org>
CommitDate: 2024-05-20 04:02:32 +0000

    compat_freebsd4: Add const qualifier to the local variable s inside function freebsd4_uname()
    
    This local variable s is for iterating characters of global variable
    `version`. The content of `version` is not going to be altered by
    function freebsd4_uname().
    
    MFC after:      1 week
---
 sys/kern/kern_xxx.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/sys/kern/kern_xxx.c b/sys/kern/kern_xxx.c
index 46155cf6a73e..fb76d420df7c 100644
--- a/sys/kern/kern_xxx.c
+++ b/sys/kern/kern_xxx.c
@@ -315,7 +315,8 @@ freebsd4_uname(struct thread *td, struct freebsd4_uname_args *uap)
 {
 	int name[2], error;
 	size_t len;
-	char *s, *us;
+	const char *s;
+	char *us;
 
 	name[0] = CTL_KERN;
 	name[1] = KERN_OSTYPE;