nproc: adjust handling of OpenMP environment variables
Adjust to match the return value from omp_get_num_threads(), i.e.:
- honor OMP_THREAD_LIMIT without OMP_NUM_THREADS
- Treat 0 as an invalid value and ignore
Also remove the call to omp_get_num_threads()
added in the previous recent commit, because it's
ineffective without the omp pragmas in place.
* lib/nproc.c (parse_omp_threads): Return 0 if specified,
so that it can be ignored.
(num_processors): Honor OMP_THREAD_LIMIT even without
OMP_NUM_THREADS being set. Also fix a typo in the environment
variable being checked, from the previous recent commit.