mirror of
https://sourceware.org/git/glibc.git
synced 2025-08-01 10:06:57 +03:00
Consolidate pthread_attr value validation
Define inline functions that wrap around validation for each of the pthread attributes to reduce duplication in code.
This commit is contained in:
@ -39,8 +39,9 @@ __pthread_attr_setstack (attr, stackaddr, stacksize)
|
||||
iattr = (struct pthread_attr *) attr;
|
||||
|
||||
/* Catch invalid sizes. */
|
||||
if (stacksize < PTHREAD_STACK_MIN)
|
||||
return EINVAL;
|
||||
int ret = check_stacksize_attr (stacksize);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
#ifdef EXTRA_PARAM_CHECKS
|
||||
EXTRA_PARAM_CHECKS;
|
||||
|
Reference in New Issue
Block a user