math: fix signed int left shift ub in sqrt
[musl.git] / src / thread / pthread_mutexattr_settype.c
blobcd7a80e342c69981f6f3095e17dfb88739c38281
1 #include "pthread_impl.h"
3 int pthread_mutexattr_settype(pthread_mutexattr_t *a, int type)
5 if ((unsigned)type > 2) return EINVAL;
6 a->__attr = (a->__attr & ~3) | type;
7 return 0;