From nobody Thu Nov 14 02:41:59 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 4XpkvC6YtWz5cxjv; Thu, 14 Nov 2024 02:41:59 +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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XpkvC5lj2z4CSP; Thu, 14 Nov 2024 02:41:59 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731552119; 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=vnorSzr0w8MF5ceHVy3zFG6gEPQMTYfyIZQFBzBxZkk=; b=gqXtbQXzQd43PcyrVVVG5iMGMCQve2WGc59fJjXYbIvYIVHvV88R4b2awmloz65hK7bHEP YgtqaKgLfCTVlclHJDupqF6YyDFDYqENgSsdcDPsy1ZUbi8UooGdrmi1AqcPutVmTfyPq4 NuJYKOyLnyvF2jQgQBSo8HW23nSQMMx2HgIB4VgKGga4jiQXxkgxqKZeKb7JNmyYCW/Of+ C/0hUNqZufVgHvYjQr129WgI9lHyAZHPBFHZTbtwcv72ddGfw2EpStazXRfpO9DVesojQa HVEFNPaHdp02GXWymUdna0uVMKnCNTJdCZ57E/XAgJLCmnWlOjKxz7W2+r9RAw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1731552119; 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=vnorSzr0w8MF5ceHVy3zFG6gEPQMTYfyIZQFBzBxZkk=; b=uKhMStEF0Z8KNecoXQIidAoEK8/1bAsl3vGRUgJ6FFb/q1WqL+6jjI5a+V1FjdXHzYB0DB TclJ76wuO9bDPXi2lrSdnhDloKz8/7mC8bE7uK+J66mBZKy2eu+dmgmQLjlN1vUR7crEdL Ib8/OBrxI/lUcW39eyuaBXHW2cGvlXLQeQIPmq7ZMuFkUYtCOrgW8tUG4yQ4Vncame9SJb Qxm0R5rGzf9ZbMUY4JMAW/8YwJZFyyg4ym4QsihRUCajl/2EEhgnJddivoTyOcTvmHhUIF l0uZz1kJuoaNgQcrm07+oLxtriMN/pz1Gy/LDjjzXZvVpmbaaUujrzs2YrZhFg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1731552119; a=rsa-sha256; cv=none; b=JDTU0NwqoxRjkt2SK4VewnwQ+ie5OBYpb5vjHjCvtbsqWeWV+pBmKoKQ3eCFUKD26FxNn2 mgxycFvec9iEASrh4p4IHi8RYaq8GeuaM2F3+a3o/fE1TsRKL1VBWhlvFviwrc6DLSBrDe /IX0NFB9ic4oQbMpi9KefDLh15OuXX6RjQ+nEzb5IY4N12enReDCoUfbhRyk9M21lGUDJH nN0k3Q3tKc9kUTZTVb83PMilbn4kQpVGfBFSJPc9QEvg/hcPCgosaAO5tFDs/cw5F36azD Jl5BsfbU35OJfYNyXN2RtVgDJHgYorkrm73DrQvpXTOY5/qntTudRHSzF8SznA== 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 4XpkvC5MHVzLG3; Thu, 14 Nov 2024 02:41:59 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4AE2fxvu042731; Thu, 14 Nov 2024 02:41:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4AE2fx8x042728; Thu, 14 Nov 2024 02:41:59 GMT (envelope-from git) Date: Thu, 14 Nov 2024 02:41:59 GMT Message-Id: <202411140241.4AE2fx8x042728@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: 092e2ff33be2 - main - ps.1: restore always true if predicate 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: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 092e2ff33be2fbe878ad65fe2e9daea918e35e39 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=092e2ff33be2fbe878ad65fe2e9daea918e35e39 commit 092e2ff33be2fbe878ad65fe2e9daea918e35e39 Author: Konstantin Belousov AuthorDate: 2024-11-14 02:16:51 +0000 Commit: Konstantin Belousov CommitDate: 2024-11-14 02:41:42 +0000 ps.1: restore always true if predicate Fixes: 62e6ca0f07e448da27cb2cc8165e749e7fdfcd7e Reported and reviewed by: jlduran Sponsored by: The FreeBSD Foundation Differential revision: https://reviews.freebsd.org/D47561 --- bin/ps/ps.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/bin/ps/ps.c b/bin/ps/ps.c index 49c69bb76084..3257f0885aa0 100644 --- a/bin/ps/ps.c +++ b/bin/ps/ps.c @@ -1268,7 +1268,6 @@ static void saveuser(KINFO *ki) { char tdname[COMMLEN + 1]; - char *argsp; ki->ki_valid = 1; @@ -1278,14 +1277,11 @@ saveuser(KINFO *ki) if (needcomm) { if (ki->ki_p->ki_stat == SZOMB) { ki->ki_args = strdup(""); - } else if (ki->ki_p->ki_args != NULL) { + } else { (void)snprintf(tdname, sizeof(tdname), "%s%s", ki->ki_p->ki_tdname, ki->ki_p->ki_moretdname); ki->ki_args = fmt(kvm_getargv, ki, ki->ki_p->ki_comm, tdname, COMMLEN * 2 + 1); - } else { - asprintf(&argsp, "(%s)", ki->ki_p->ki_comm); - ki->ki_args = argsp; } if (ki->ki_args == NULL) xo_errx(1, "malloc failed");