summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorMax Romanov <max.romanov@nginx.com>2020-10-14 18:41:31 +0300
committerMax Romanov <max.romanov@nginx.com>2020-10-14 18:41:31 +0300
commitd8628a43d0705deeb3473faf0252288038defc2b (patch)
tree45880e21e4c6d254c47164725b74238b774880c1 /src
parent9dcb7ec4b791f542a81e552dbb7a1cfa43430dd4 (diff)
downloadunit-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 'src')
-rw-r--r--src/nxt_lib.c5
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;