selftests/net: ipsec: fix constant out of range
[platform/kernel/linux-rpi.git] / tools / testing / selftests / net / ipsec.c
index 9a8229a..be4a30a 100644 (file)
@@ -2263,7 +2263,7 @@ static int check_results(void)
 
 int main(int argc, char **argv)
 {
-       unsigned int nr_process = 1;
+       long nr_process = 1;
        int route_sock = -1, ret = KSFT_SKIP;
        int test_desc_fd[2];
        uint32_t route_seq;
@@ -2284,7 +2284,7 @@ int main(int argc, char **argv)
                        exit_usage(argv);
                }
 
-               if (nr_process > MAX_PROCESSES || !nr_process) {
+               if (nr_process > MAX_PROCESSES || nr_process < 1) {
                        printk("nr_process should be between [1; %u]",
                                        MAX_PROCESSES);
                        exit_usage(argv);