Skip to content

Commit fc636df

Browse files
committed
Incorporate review comment
1 parent d6a05bb commit fc636df

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

system/lib/libc/musl/src/thread/pthread_detach.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ static int __pthread_detach(pthread_t t)
66
#ifdef __EMSCRIPTEN__
77
// Attempt to detach a thread which does not point to a valid thread, or
88
// does not exist anymore.
9-
if (!t || t->self != t) return ESRCH;
9+
if (t->self != t) return ESRCH;
1010
#endif
1111
/* If the cas fails, detach state is either already-detached
1212
* or exiting/exited, and pthread_join will trap or cleanup. */

system/lib/libc/musl/src/thread/pthread_join.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ static int __pthread_timedjoin_np(pthread_t t, void **res, const struct timespec
1616
#ifdef __EMSCRIPTEN__
1717
// Attempt to join a thread which does not point to a valid thread, or
1818
// does not exist anymore.
19-
if (!t || t->self != t) return ESRCH;
19+
if (t->self != t) return ESRCH;
2020
// Thread is attempting to join to itself. Already detached threads are
2121
// handled below by returning EINVAL instead.
2222
if (t->detach_state != DT_DETACHED && __pthread_self() == t) return EDEADLK;

0 commit comments

Comments
 (0)