fix signed left-shift overflow in pthread_condattr_setpshared
This commit is contained in:
1 parent
ad85fcb568
commit
380857bf21
1 file changed
+1
-1
@@ -4,6 +4,6 @@ int pthread_condattr_setpshared(pthread_condattr_t *a, int pshared)
|
||||
{
|
||||
if (pshared > 1U) return EINVAL;
|
||||
a->__attr &= 0x7fffffff;
|
||||
a->__attr |= pshared<<31;
|
||||
a->__attr |= (unsigned)pshared<<31;
|
||||
return 0;
|
||||
}
|
||||
Reference in new issue
Block a user