From nobody Mon May 20 04:04:01 2024 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4VjP820b7sz5LhKB; Mon, 20 May 2024 04:04:02 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4VjP815qzKz4BNl; Mon, 20 May 2024 04:04:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716177841; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=l5FWSOLQ6u8siNOge4Zr4KqIN8v4/HVTzUr8kin8kMs=; b=e0K29B0LpdBTCTrrgsnLKvxHldrdZYRK7NJeODsYiBurPvY19E3MYux0f+f0F/0mkAmr6H Ta5pl3OV+alNQi4CU75dx9IMbHQYn33VM3+jn2bJShg3AIAhYmz69XdDs/YVIZyhqi4a3w 0vFNbcMMVpG/SraJqPcCcfcV5uwd4dNyIM9nwUDgBwVFZRng6CROZQFzHFlKuS8FSsVQAE sS9WNXthdDKISXXLEjY3fzbFA1tnPhV+TzjovZI4NkpABpP3oshDxJP3QGvYmxg2Mcpvqc SGeybMtb3+q+jex7I2ZpJosBF7li2r9M01kAhpF/eIMutGMNOLamtDs2TSlD5w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1716177841; a=rsa-sha256; cv=none; b=SyRw7JEgM8K2gPCh9+XvLjv6s/3R/JQgq9wSL69+uFYf8ZDNs4bVmUrH4FCwF8fQKE9tNv 955hfvYsLhI28C2nyC/rurekkaNRWKlMRSHKNzsKK3ZeIMtSUrsXiTirfW8F5f/uIwfb8U tycYFNxjcwVPgkvUE/3GXkg4ejznGMvAfsTb9E4bu1aCf6/Otj1oVlu5nm1ghmjDQcStTG 3tqotO0+dD5oBTIIIUpaTamVK2W0EctsL4kLIjIYy0m5tEYwsndWGWleFhdSXzg8Otdn6l Pmf8InXjJlNQNjt8tBxpqEqOZ+h49T8fa0ym+VIKDuQKnXRdWvJacW8bWzlUjw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1716177841; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=l5FWSOLQ6u8siNOge4Zr4KqIN8v4/HVTzUr8kin8kMs=; b=ftDRvS8Xfrym0ZxJNxvFRlvNcyCOc2cC4FVY2nBIwJMEbnQUVLD8n6tCiikJanjWn+hyTT wzTwvJL7YtrSe0yZOLFlWbRMaVf2U1hBYdc+ZVQnS7KGp4Mb1La0AS9uknbj/DC2szoLS9 JzgOXf7E4+D2KX5jk8/AUpZoMfDyk5qGkYrAOsByxSi4bJKWb0HVUxySAWHmcGS5ouaS26 KiD8FjdjgAkcof1zmdHalBDIgDjmchBG+kvXeOA/DSRqHzmrtL+9rKyJV4wOCWKVZuimgo g94p0x9y2OA4rQCHClzE27fsqlgLfpSxTN6kS4yA+hIGXxBRIxca5mSEVBXrtg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4VjP814rnPzNHD; Mon, 20 May 2024 04:04:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 44K441XT080253; Mon, 20 May 2024 04:04:01 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 44K441cq080250; Mon, 20 May 2024 04:04:01 GMT (envelope-from git) Date: Mon, 20 May 2024 04:04:01 GMT Message-Id: <202405200404.44K441cq080250@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Zhenlei Huang Subject: git: 92f2a4c820fe - main - compat_freebsd4: Add const qualifier to the local variable s inside function freebsd4_uname() List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 92f2a4c820fea9efcb6ee6a7029495c8152958c1 Auto-Submitted: auto-generated The branch main has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=92f2a4c820fea9efcb6ee6a7029495c8152958c1 commit 92f2a4c820fea9efcb6ee6a7029495c8152958c1 Author: Zhenlei Huang AuthorDate: 2024-05-20 04:02:32 +0000 Commit: Zhenlei Huang 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;