git: f183abd1286a - stable/13 - 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:42:10 UTC
The branch stable/13 has been updated by zlei:

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

commit f183abd1286a961ee1bdd3faae4048df40c37906
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:37:42 +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)
    (cherry picked from commit 5fd1902b0c768fa43d3d7eebf7efd0957d5e144f)
---
 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 ae88fc90eb7c..b51a0edaac99 100644
--- a/sys/kern/kern_xxx.c
+++ b/sys/kern/kern_xxx.c
@@ -325,7 +325,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;