**Describe the bug**
The following code checks that `strtol` doesn't read a negative number from the environment variable.
<img width="1155" alt="image" src="https://github.com/Blosc/c-blosc2/assets/43664/c7b0c7e6-135c-4658-9b26-933fe8f50fa8">
What the code should really do is check that `((int16_t) nthreads) > 0`. That is, `strtol` could read in `65535`, which is a non-negative `long` number. Then, the (highlighted) cast to an `int16_t` would interpret this as `-1`.

**To Reproduce**
Set `BLOSC_NTHREADS` environment variable to `65535`.

**System information:**
 - OS: macOS
 - Compiler: Clang
 - Version: 16
Signed down cast negates usefulness of preceding bounds check
This is a GitHub Issue
repo:c-blosc2
owner:Blosc
Title : Signed down cast negates usefulness of preceding bounds check
Issue date:

--- start body ---
**Describe the bug**
The following code checks that `strtol` doesn't read a negative number from the environment variable.
<img width="1155" alt="image" src="https://github.com/Blosc/c-blosc2/assets/43664/c7b0c7e6-135c-4658-9b26-933fe8f50fa8">
What the code should really do is check that `((int16_t) nthreads) > 0`. That is, `strtol` could read in `65535`, which is a non-negative `long` number. Then, the (highlighted) cast to an `int16_t` would interpret this as `-1`.

**To Reproduce**
Set `BLOSC_NTHREADS` environment variable to `65535`.

**System information:**
 - OS: macOS
 - Compiler: Clang
 - Version: 16
--- end body ---
