mirror of
git://git.musl-libc.org/musl
synced 2025-04-04 23:30:14 +00:00
fix signed left-shift overflow in pthread_condattr_setpshared
This commit is contained in:
parent
ad85fcb568
commit
380857bf21
@ -4,6 +4,6 @@ int pthread_condattr_setpshared(pthread_condattr_t *a, int pshared)
|
|||||||
{
|
{
|
||||||
if (pshared > 1U) return EINVAL;
|
if (pshared > 1U) return EINVAL;
|
||||||
a->__attr &= 0x7fffffff;
|
a->__attr &= 0x7fffffff;
|
||||||
a->__attr |= pshared<<31;
|
a->__attr |= (unsigned)pshared<<31;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user