app/crypto-perf: remove always true condition
authorFerruh Yigit <ferruh.yigit@intel.com>
Thu, 19 Nov 2020 11:58:59 +0000 (11:58 +0000)
committerDavid Marchand <david.marchand@redhat.com>
Mon, 11 Jan 2021 09:45:34 +0000 (10:45 +0100)
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: stable@dpdk.org
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
app/test-crypto-perf/main.c

index 5f03551..99f86e9 100644 (file)
@@ -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)