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:
Jason Evans 2013-11-29 16:19:44 -08:00
parent 39e7fd0580
commit addad093f8

View File

@ -262,14 +262,7 @@ malloc_ncpus(void)
#else #else
result = sysconf(_SC_NPROCESSORS_ONLN); result = sysconf(_SC_NPROCESSORS_ONLN);
#endif #endif
if (result == -1) { return ((result == -1) ? 1 : (unsigned)result);
/* Error. */
ret = 1;
} else {
ret = (unsigned)result;
}
return (ret);
} }
void void