1
0
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:
Siddhesh Poyarekar
2013-04-22 10:28:31 +05:30
parent 2169712d9c
commit da1304bcc8
7 changed files with 98 additions and 29 deletions

View File

@ -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;