On 12/2/22 12:02 PM, Rose via GitGitGadget wrote:
From: Seija <doremylover123@xxxxxxxxx>
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@xxxxxxxxx>
---
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, and the contents of *thread are undefined."
As such, we ought to check for an error by seeing if the output is not
0, rather than being less than 0, since nothing stops these functions
from returning a positive number.
Signed-off by: Seija doremylover123@xxxxxxxxx
Good catch!
LGTM
Thanks,
Jeff