git: 5fd1902b0c76 - stable/14 - compat_freebsd4: Add const qualifier to the local variable s inside function freebsd4_uname()

From: Zhenlei Huang <zlei_at_FreeBSD.org>
Date: Tue, 28 May 2024 04:22:02 UTC
The branch stable/14 has been updated by zlei:

URL: https://cgit.FreeBSD.org/src/commit/?id=5fd1902b0c768fa43d3d7eebf7efd0957d5e144f

commit 5fd1902b0c768fa43d3d7eebf7efd0957d5e144f
Author:     Zhenlei Huang <zlei@FreeBSD.org>
AuthorDate: 2024-05-28 04:21:20 +0000
Commit:     Zhenlei Huang <zlei@FreeBSD.org>
CommitDate: 2024-05-28 04:21:20 +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
    
    (cherry picked from commit 92f2a4c820fea9efcb6ee6a7029495c8152958c1)
---
 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 66d99edb7da1..d6687fae0caf 100644
--- a/sys/kern/kern_xxx.c
+++ b/sys/kern/kern_xxx.c
@@ -318,7 +318,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;