maintenance: compare output of pthread functions for inequality with 0
commit786e67611d46cd761e1aaa73f85b62f3dda1960a
authorSeija <doremylover123@gmail.com>
Fri, 2 Dec 2022 17:02:58 +0000 (2 17:02 +0000)
committerJunio C Hamano <gitster@pobox.com>
Mon, 5 Dec 2022 01:15:54 +0000 (5 10:15 +0900)
treefccb324ff39356045f3031ef4c6b005794a0d96b
parente7e5c6f715b2de7bea0d39c7d2ba887335b40aa0
maintenance: compare output of pthread functions for inequality with 0

The documentation for pthread_create and pthread_sigmask state that:

"On success, pthread_create() returns 0;
on error, it returns an error number"

As such, we ought to check for an error
by seeing if the output is not 0.

Checking for "less than" is a mistake
as the error code numbers can be greater than 0.

Signed-off-by: Seija <doremylover123@gmail.com>
Acked-by: Jeff Hostetler <jeffhost@microsoft.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
builtin/fsmonitor--daemon.c
run-command.c