From nobody Fri Jun 5 06:02:37 2026 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 4gWrSf6lTGz6gT6l for ; Fri, 05 Jun 2026 06:02:42 +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 "R13" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4gWrSf4Yzgz3HXY for ; Fri, 05 Jun 2026 06:02:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1780639362; 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=79gf4M0b6Tf4o2v1wskhesSrHXRwII0YUMVVDrNgIhE=; b=Sw1Mr1YA/fGeCXAojVNGi4NueWuurQvrcoC+lY6xvGnMnTECqe9UC1E4F1LoGAxYI696W4 pIORRWNQYSYhED/NFzSfynCa0NAzIf+4WmufLdFk8iECeNJBw9gFFDJML1JUthEjHwPpGF iyiRrC8EDK90jp7A27F6ydyPq1+zh7YFG55yQQipiqmAOe6lPefB8+JybDNFRFbCa3TYGr dcBkxIBOBsmp8RHctGJmKuJv5UoGfu4HWeSf7082qAF5qsiqA9xi2rLboOdxlFemdgqt+9 T7U8gllA/DiK4PRMCK+iU5yt4W0Po6QBoNJ3ntN7FcZtL+qQP/utpgTcrdluUQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1780639362; a=rsa-sha256; cv=none; b=j4O8uuD/SSSbYl66tNBn2buDMtk0c7pLoFdGAUxlYJcsN9XM0iC2cBEIastMc9XGQGJMkC duWNRSX0I3lOjukXhmKAJe680LvxGYprO0AL3YCVrknPUtCf7BxXYOsj1O803dik3kCWxh QyowBxzawZgM7/W3/lYN9Ttene3hxwUCIQJNoXou8QEJkGk7jFebMWa6cQgnKe9Fv84sIU oyz72hiZhqj8opqffTmallAFORs2tKAGTdSdJb4V8tqOkzonpx2pQ7ZWbP5hzkpJcbgxce pEzemDiNkHUtC48nqBfclbVOqUXMuyu8g1VmJvG9Bmg5DuRVr1I2b+5NxEy1sA== 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=1780639362; 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=79gf4M0b6Tf4o2v1wskhesSrHXRwII0YUMVVDrNgIhE=; b=bIMd9/PYa35MKBBZQp2V6kwy035hqYmQfz1rQ5aNCPLzSiAFf+/CqS5RKHynN20SmoFuCH TqJfyvy/eX0dejUweheF/cPXN4XgvmfVE9Sai5ksiWljk5fw+6X/oKBuXUkJPuRyCh2TRf wGOUh3lddRcGIjxrGgPGSxxtCNJ6ypSocvqjeW9PeA73HIEl9vYNURCtfb9X3+2ih0+vcP cfIb6XxuwGDpBDEUNyfMzGtvhrUBIiymYeGI900QC5w6tozu+8BuSA75tZEegBL5IOd+nA vv3rvSEJbmhRh5tcmIAym32Sz9oVwyIyMg0EVfsfmzgWQ4ZOBe5b7MXUca0how== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4gWrSY49Cgz29P for ; Fri, 05 Jun 2026 06:02:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 27181 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Fri, 05 Jun 2026 06:02:37 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Baptiste Daroussin Subject: git: 5f9c8f142d17 - main - pw: fix const qualification in unquote() 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 List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: bapt X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 5f9c8f142d1702f5810618e02534054d28d22fa5 Auto-Submitted: auto-generated Date: Fri, 05 Jun 2026 06:02:37 +0000 Message-Id: <6a22667d.27181.44a40b6@gitrepo.freebsd.org> The branch main has been updated by bapt: URL: https://cgit.FreeBSD.org/src/commit/?id=5f9c8f142d1702f5810618e02534054d28d22fa5 commit 5f9c8f142d1702f5810618e02534054d28d22fa5 Author: Baptiste Daroussin AuthorDate: 2026-06-04 22:13:23 +0000 Commit: Baptiste Daroussin CommitDate: 2026-06-05 06:01:44 +0000 pw: fix const qualification in unquote() The unquote() function took a const char * parameter but modified the string in-place (removing quote characters). Change the parameter to char * and update callers that passed const char * to cast explicitly. --- usr.sbin/pw/pw_conf.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/usr.sbin/pw/pw_conf.c b/usr.sbin/pw/pw_conf.c index e9042b15b321..21c4824ead93 100644 --- a/usr.sbin/pw/pw_conf.c +++ b/usr.sbin/pw/pw_conf.c @@ -156,22 +156,22 @@ static char const *kwds[] = }; static char * -unquote(char const * str) +unquote(char * str) { if (str && (*str == '"' || *str == '\'')) { char *p = strchr(str + 1, *str); if (p != NULL) *p = '\0'; - return (char *) (*++str ? str : NULL); + return (*++str ? str : NULL); } - return (char *) str; + return (str); } int boolean_val(char const * str, int dflt) { - if ((str = unquote(str)) != NULL) { + if ((str = unquote((char *)str)) != NULL) { int i; for (i = 0; booltrue[i]; i++) @@ -187,7 +187,7 @@ boolean_val(char const * str, int dflt) int passwd_val(char const * str, int dflt) { - if ((str = unquote(str)) != NULL) { + if ((str = unquote((char *)str)) != NULL) { int i; for (i = 0; booltrue[i]; i++) @@ -228,7 +228,7 @@ newstr(char const * p) { char *q; - if ((p = unquote(p)) == NULL) + if ((p = unquote((char *)p)) == NULL) return (NULL); if ((q = strdup(p)) == NULL)