mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-04-21 02:12:15 +03:00
Clean up malloc_ncpus().
Clean up malloc_ncpus() by replacing incorrectly indented if..else branches with a ?: expression. Submitted by Igor Podlesny.
This commit is contained in:
parent
39e7fd0580
commit
addad093f8
1 changed files with 1 additions and 8 deletions
|
|
@ -262,14 +262,7 @@ malloc_ncpus(void)
|
|||
#else
|
||||
result = sysconf(_SC_NPROCESSORS_ONLN);
|
||||
#endif
|
||||
if (result == -1) {
|
||||
/* Error. */
|
||||
ret = 1;
|
||||
} else {
|
||||
ret = (unsigned)result;
|
||||
}
|
||||
|
||||
return (ret);
|
||||
return ((result == -1) ? 1 : (unsigned)result);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue