From nobody Sat Dec 28 17:20:21 2024 X-Original-To: dev-commits-src-main@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 4YL8JQ2x65z5jfRJ; Sat, 28 Dec 2024 17:20:22 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4YL8JQ0krTz4my9; Sat, 28 Dec 2024 17:20:22 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1735406422; 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=pDNNxkF4BohC/3M/Ox/uzvsdDQLPdv9SZw+dr1JZlIs=; b=htzwHYDxv0/E6H8qqDMDx4+ljFLE85TByVTfQGyKdlIQDIfAoMGSV5/Gvab4wxrcRC6xc1 qp+nlwgAJRAciOo6lvOLxPOYx0EE/4Mco75elePZ85mL3FiDzh1TW8GB2M1RSe1S9S4Gw1 ghP3Fx1nkB/njhgNL+2GVVhmbwqTaFhY++iSUsF5AaNK5/FAQwvf5yuIsyxjOVch0GeDlh NjuutIPAiTgwDmLFtMxRvOAn1Du5IhUh+O0KyRxkAKQRNOlUIueuUu0tGFOHEYl5LB86BL qqieSvmDUvRT2KLtCrmertlSFNQau1e49tucdfHRONrTZX+6hDibSKHaexDivQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1735406422; 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=pDNNxkF4BohC/3M/Ox/uzvsdDQLPdv9SZw+dr1JZlIs=; b=rhyyI0WSetNRlzLInzGWH6NJz50Fmjzbr3i+xZYrqLu5UIliXEYKVKPVEKEzLo4SPvEsfJ O0q/lYq8j7HVdqKimjQZjF3shFkLQvpCQ1N/pVQHBq3sE+UQ6JUjnpVe5cEKN3Z5K0edyd qwhJ5RrXcmuDoKJMErKzFPqMcYcGbdu0O2yV2QNhbyS3RXr8DkxtCgo1/T6zwB8LuxJf6V DgGJdoJ4VKplR0PK7M/gh8bfX6p+JD99SRWy9RAyauv7lxrFO6MFqQOVZWGQyCuqJ0n7dM KiCuJBwrUxYR7bom7YPde3xOBS5iGys8LxuIwo+rOYm2eRCCHY3R5y9yaikAvQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1735406422; a=rsa-sha256; cv=none; b=MWG6b9k36cq09zMW7BKc8ig5yALAFz5NBvUUgEdPCIURPN1MPXSWQnpq67XMl8SyWTx+Pj oqV/bXGKB4mLdiu6ecT0IuQF2VCFvWcKm3CSc9ykw3vPAPUadFxtvscDYLKg6Kvy/eu4ST fC1S+NKQHHwtAYU4uQ0J8cL/uoKkwC+hwxCpWyN7dvIQJTRFQiu7p8ft7C4W9yD9IJ2Lkp WHj8f65ro7G39fYrSgXJjLvZmUmXuG/cetMNUfjQaHNMmuZGd9beyPixgfnIvcoWu13zYr Cr3LKGytFi7J0nbTk8GIc75fFjfGU+J2TjBHRkC4y4Sitt5b8rvEdbtXA7oY4w== 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 4YL8JP41sWzXvZ; Sat, 28 Dec 2024 17:20:21 +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 4BSHKL72061841; Sat, 28 Dec 2024 17:20:21 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4BSHKLjk061838; Sat, 28 Dec 2024 17:20:21 GMT (envelope-from git) Date: Sat, 28 Dec 2024 17:20:21 GMT Message-Id: <202412281720.4BSHKLjk061838@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: 3282e368e004 - main - thr_cancel.c: style List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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: 3282e368e00460de500e5cfcf1c33b597199aaf8 Auto-Submitted: auto-generated The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=3282e368e00460de500e5cfcf1c33b597199aaf8 commit 3282e368e00460de500e5cfcf1c33b597199aaf8 Author: Konstantin Belousov AuthorDate: 2024-12-21 17:55:11 +0000 Commit: Konstantin Belousov CommitDate: 2024-12-28 17:01:19 +0000 thr_cancel.c: style Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D48200 --- lib/libthr/thread/thr_cancel.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/libthr/thread/thr_cancel.c b/lib/libthr/thread/thr_cancel.c index b1b95e54b46f..0e00c2c36086 100644 --- a/lib/libthr/thread/thr_cancel.c +++ b/lib/libthr/thread/thr_cancel.c @@ -99,9 +99,9 @@ _thr_setcancelstate(int state, int *oldstate) return (EINVAL); } - if (oldstate) { + if (oldstate != NULL) { *oldstate = oldval ? PTHREAD_CANCEL_ENABLE : - PTHREAD_CANCEL_DISABLE; + PTHREAD_CANCEL_DISABLE; } return (0); } @@ -125,9 +125,9 @@ _thr_setcanceltype(int type, int *oldtype) return (EINVAL); } - if (oldtype) { + if (oldtype != NULL) { *oldtype = oldval ? PTHREAD_CANCEL_ASYNCHRONOUS : - PTHREAD_CANCEL_DEFERRED; + PTHREAD_CANCEL_DEFERRED; } return (0); }