]> git.droids-corp.org - dpdk.git/blobdiff - lib/librte_rib/rte_rib.c
rib: check for negative maximum of nodes
[dpdk.git] / lib / librte_rib / rte_rib.c
index e40cf715c099ed91ad2d5e47ec0b35ea92100cea..2a370d7f84398940f38fd65b8528b48328493d4c 100644 (file)
@@ -401,8 +401,7 @@ rte_rib_create(const char *name, int socket_id, const struct rte_rib_conf *conf)
        struct rte_mempool *node_pool;
 
        /* Check user arguments. */
-       if ((name == NULL) || (conf == NULL) ||
-                       (conf->max_nodes == 0)) {
+       if (name == NULL || conf == NULL || conf->max_nodes <= 0) {
                rte_errno = EINVAL;
                return NULL;
        }