pipeline: fix build with ASan
authorZhihong Peng <zhihongx.peng@intel.com>
Wed, 20 Oct 2021 07:46:42 +0000 (15:46 +0800)
committerDavid Marchand <david.marchand@redhat.com>
Fri, 29 Oct 2021 13:25:34 +0000 (15:25 +0200)
Code changes to avoid the following build error:
"Control reaches end of non-void function".

Signed-off-by: Xueqin Lin <xueqin.lin@intel.com>
Signed-off-by: Zhihong Peng <zhihongx.peng@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
lib/pipeline/rte_swx_pipeline.c

index 5e089fb..1afaffe 100644 (file)
@@ -4642,7 +4642,7 @@ instr_meter_translate(struct rte_swx_pipeline *p,
                return 0;
        }
 
-       CHECK(0, EINVAL);
+       return -EINVAL;
 }
 
 static inline void
@@ -5937,7 +5937,7 @@ instr_translate(struct rte_swx_pipeline *p,
                                              instr,
                                              data);
 
-       CHECK(0, EINVAL);
+       return -EINVAL;
 }
 
 static struct instruction_data *