git: d51ecba718cf - stable/14 - thr_cancel.c: style
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sat, 04 Jan 2025 03:57:43 UTC
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);
}