> -----Original Message----- > From: dev <dev-boun...@dpdk.org> On Behalf Of Ferruh Yigit > Sent: Thursday, November 19, 2020 11:59 AM > To: dev@dpdk.org; Doherty, Declan <declan.dohe...@intel.com>; Kerlin, > Marcin <marcin.ker...@intel.com>; Mrozowicz, SlawomirX > <slawomirx.mrozow...@intel.com>; Kobylinski, Michal > <michal.kobylin...@intel.com>; Piotr Azarewicz > <piotrx.t.azarew...@intel.com> > Cc: Yigit, Ferruh <ferruh.yi...@intel.com>; sta...@dpdk.org > Subject: [dpdk-dev] [v21.02 v3 09/10] app/crypto-perf: remove always true > condition > > This is already 'else' leg of the opposite comparison, simple 'else' > will be logically same. > > Fixes: f8be1786b1b8 ("app/crypto-perf: introduce performance test > application") > Cc: sta...@dpdk.org > > Signed-off-by: Ferruh Yigit <ferruh.yi...@intel.com> > --- > app/test-crypto-perf/main.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/app/test-crypto-perf/main.c b/app/test-crypto-perf/main.c > index 5f035519c3..99f86e9019 100644 > --- a/app/test-crypto-perf/main.c > +++ b/app/test-crypto-perf/main.c > @@ -390,7 +390,7 @@ cperf_check_test_vector(struct cperf_options *opts, > if (opts->cipher_algo == RTE_CRYPTO_CIPHER_NULL) { > if (test_vec->plaintext.data == NULL) > return -1; > - } else if (opts->cipher_algo != RTE_CRYPTO_CIPHER_NULL) { > + } else { > if (test_vec->plaintext.data == NULL) > return -1; > if (test_vec->plaintext.length < opts- > >max_buffer_size) > @@ -440,7 +440,7 @@ cperf_check_test_vector(struct cperf_options *opts, > return -1; > if (test_vec->plaintext.length < opts- > >max_buffer_size) > return -1; > - } else if (opts->cipher_algo != RTE_CRYPTO_CIPHER_NULL) { > + } else { > if (test_vec->plaintext.data == NULL) > return -1; > if (test_vec->plaintext.length < opts- > >max_buffer_size) > -- > 2.26.2
Thanks Ferruh! Acked-by: Fan Zhang <roy.fan.zh...@intel.com>