Configuration: Fix validation of "processes"
It's an integer, not a floating number.
Fixes: 68c6b67ffc ("Configuration: support for rational numbers.")
Closes: https://github.com/nginx/unit/issues/1115
Link: <https://github.com/nginx/unit/pull/1116>
Reviewed-by: Zhidao Hong <z.hong@f5.com>
Reviewed-by: Andrew Clayton <a.clayton@nginx.com>
Cc: Dan Callahan <d.callahan@f5.com>
Cc: Valentin Bartenev <vbartenev@gmail.com>
Signed-off-by: Alejandro Colomar <alx@kernel.org>
This commit is contained in:
@@ -2830,7 +2830,7 @@ nxt_conf_vldt_processes(nxt_conf_validation_t *vldt, nxt_conf_value_t *value,
|
|||||||
nxt_int_t ret;
|
nxt_int_t ret;
|
||||||
nxt_conf_vldt_processes_conf_t proc;
|
nxt_conf_vldt_processes_conf_t proc;
|
||||||
|
|
||||||
if (nxt_conf_type(value) == NXT_CONF_NUMBER) {
|
if (nxt_conf_type(value) == NXT_CONF_INTEGER) {
|
||||||
int_value = nxt_conf_get_number(value);
|
int_value = nxt_conf_get_number(value);
|
||||||
|
|
||||||
if (int_value < 1) {
|
if (int_value < 1) {
|
||||||
|
|||||||
Reference in New Issue
Block a user