Date: Sat, 4 Jan 2025 03:57:43 GMT From: Konstantin Belousov <kib@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org Subject: git: d51ecba718cf - stable/14 - thr_cancel.c: style Message-ID: <202501040357.5043vht7028185@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch stable/14 has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=d51ecba718cf6013108454583063a1fa7fae2566 commit d51ecba718cf6013108454583063a1fa7fae2566 Author: Konstantin Belousov <kib@FreeBSD.org> AuthorDate: 2024-12-21 17:55:11 +0000 Commit: Konstantin Belousov <kib@FreeBSD.org> 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); }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202501040357.5043vht7028185>