From nobody Sat Jan 04 03:57:43 2025 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 4YQ6940V2pz5j8lc; Sat, 04 Jan 2025 03:57:44 +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 4YQ69371Ngz4qbC; Sat, 4 Jan 2025 03:57:43 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1735963064; 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=PmtD6GWZu7cw7FIG/GjbebHz/GIpaN2wOM5vvrQbtTw=; b=rqL6aDOWHF7f3pnsAc5B1CTCgFO5uSw5hFBD7u+UpSF8nFDbJr041IOlWrivkqVNR8Mdz5 zp3dMh/lr/zaW0tumKnkLfl0fFbguaOHoQHtReEHHFCWwW/N16rVTqphY8eMR/aT0Kjdso Y4MRMuMWW5/ee++9kJfLbbFRqG0yQKFACZ7zp0VXgmOFBBrMl9HwyoTPKo56YmfAGaunFw gQO+ymw7kAb+jOZSofkC1D7J8na/QBiY9PkGoncC0nyL8U8zbWNct7G3a1GuHBbtUY4san VCcGQfHZJXGBcaUv+h8hkJuNptRTXGxmI/PtNFOoFK5gwQNAybyoQLjxBwIzGA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1735963064; 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=PmtD6GWZu7cw7FIG/GjbebHz/GIpaN2wOM5vvrQbtTw=; b=C3Wo2ixyy7hm2ab1/JLS6qN9BoUKQq8ag54q2YMieH4cbz9PyeOiinxJqRbvSiXekM1xxp xR7QUCOpV9iVbx31gZqmYlvxWBtBeXwKGOCvWpPTHr1DyinuaZkONh5BSElltXRcAJ9onA 5KEr06WI/SuvDWYsK2EVPGDYJRvbVXh3m5Xo2uPI//dc9f6h5+0P8ClbSgWr3lBfmxwmf+ EhPp17mOSHkeeOxTDUY+ioBXxvTTcHZ87b4DtE5LwIJIY3RKfgHjeW2eRe3EPuGyLFMoT/ DbShdBfvtbYGpu1uoIJzHRBZ7IICr763oh0MjaMQ7XkBkV+qowwbwpCGG5i5lA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1735963064; a=rsa-sha256; cv=none; b=bhFpmWM5lzavymjJ7q2bI8HxHi62BP3agHvGxeLrM+qCphNPUluhXrGUWCJ47+6rMQHL4Q Orx5FuXNqqEHAc3taq5qupVtrQrsu+9AIlzXjRw/Mq+PqafLSr+AWm6sGLXQHrfst1DgNZ w1bBz4+fULYzby/bEWDTodYT2rujT50FxEDAAhBckPAiJT1ti2HGLUyQmWf0ktd1t1MBzL XExMNKxUZymbcmQBbIHLfUwf7zLjd6SJr0rlZ/drDpTAgKU5NVTzXFAMVgsDfBbyEPXmYn MJdVNm82BUscOVYgFqLp+0ekOGpmhSDUGAXkP54uulnIQ6nNxabsRG2jMQXG9A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none 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 4YQ6936XmxzckC; Sat, 04 Jan 2025 03:57:43 +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 5043vh2G028188; Sat, 4 Jan 2025 03:57:43 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 5043vht7028185; Sat, 4 Jan 2025 03:57:43 GMT (envelope-from git) Date: Sat, 4 Jan 2025 03:57:43 GMT Message-Id: <202501040357.5043vht7028185@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Konstantin Belousov Subject: git: d51ecba718cf - stable/14 - thr_cancel.c: style 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/stable/14 X-Git-Reftype: branch X-Git-Commit: d51ecba718cf6013108454583063a1fa7fae2566 Auto-Submitted: auto-generated The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=d51ecba718cf6013108454583063a1fa7fae2566 commit d51ecba718cf6013108454583063a1fa7fae2566 Author: Konstantin Belousov AuthorDate: 2024-12-21 17:55:11 +0000 Commit: Konstantin Belousov CommitDate: 2025-01-04 03:57:24 +0000 thr_cancel.c: style (cherry picked from commit 3282e368e00460de500e5cfcf1c33b597199aaf8) --- 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); }