]> git.droids-corp.org - dpdk.git/blobdiff - lib/pipeline/rte_swx_ctl.c
pipeline: fix table entry read
[dpdk.git] / lib / pipeline / rte_swx_ctl.c
index 5d04e750f4cb4669275af7bf8257376e37d9e04c..d1a5ba431f26d5eb56823ec0824703f9a3c8b7bf 100644 (file)
@@ -1636,7 +1636,7 @@ rte_swx_ctl_pipeline_table_entry_read(struct rte_swx_ctl_pipeline *ctl,
        /*
         * Match.
         */
-       if (n_tokens && strcmp(tokens[0], "match"))
+       if (!(n_tokens && !strcmp(tokens[0], "match")))
                goto action;
 
        if (n_tokens < 1 + table->info.n_match_fields)
@@ -1719,7 +1719,7 @@ rte_swx_ctl_pipeline_table_entry_read(struct rte_swx_ctl_pipeline *ctl,
         * Action.
         */
 action:
-       if (n_tokens && strcmp(tokens[0], "action"))
+       if (!(n_tokens && !strcmp(tokens[0], "action")))
                goto other;
 
        if (n_tokens < 2)