diff options
author | Max Romanov <max.romanov@nginx.com> | 2020-10-14 18:41:31 +0300 |
---|---|---|
committer | Max Romanov <max.romanov@nginx.com> | 2020-10-14 18:41:31 +0300 |
commit | d8628a43d0705deeb3473faf0252288038defc2b (patch) | |
tree | 45880e21e4c6d254c47164725b74238b774880c1 | |
parent | 9dcb7ec4b791f542a81e552dbb7a1cfa43430dd4 (diff) | |
download | unit-d8628a43d0705deeb3473faf0252288038defc2b.tar.gz unit-d8628a43d0705deeb3473faf0252288038defc2b.tar.bz2 |
Fixing uninitialized ncpu value on unsupported platforms.
Thanks to @geyslan.
This closes #455 issue on GitHub.
Diffstat (limited to '')
-rw-r--r-- | src/nxt_lib.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/nxt_lib.c b/src/nxt_lib.c index 1634a2b8..aba07dda 100644 --- a/src/nxt_lib.c +++ b/src/nxt_lib.c @@ -91,9 +91,12 @@ nxt_lib_start(const char *app, char **argv, char ***envp) #elif (NXT_HPUX) n = mpctl(MPC_GETNUMSPUS, NULL, NULL); +#else + n = 0; + #endif - nxt_debug(&nxt_main_task, "ncpu: %ui", n); + nxt_debug(&nxt_main_task, "ncpu: %d", n); if (n > 1) { nxt_ncpu = n; |