rib: check for negative maximum of nodes
[dpdk.git] / lib / librte_rib / rte_rib.c
index e40cf71..2a370d7 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;
        }