In this case test_crypto returns the value of "ret" but if openssl_ciocrypt fails, the error code was set in "fail" and later ignored
Signed-off-by: Cristian Stoica <cristian.sto...@nxp.com> --- tests/hash_comp.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/hash_comp.c b/tests/hash_comp.c index 9e700a1..1329128 100644 --- a/tests/hash_comp.c +++ b/tests/hash_comp.c @@ -38,7 +38,7 @@ test_crypto(int cfd, struct session_op *sess, int datalen) struct crypt_op cryp; - int ret = 0, fail = 0; + int ret = 0; data = malloc(datalen); memset(data, datalen & 0xff, datalen); @@ -68,7 +68,7 @@ test_crypto(int cfd, struct session_op *sess, int datalen) if (memcmp(mac, mac_comp, AALG_MAX_RESULT_LEN)) { printf("fail for datalen %d, MACs do not match!\n", datalen); - fail = 1; + ret = 1; printf("wrong mac: "); printhex(mac, 20); printf("right mac: "); -- 2.7.3 _______________________________________________ Cryptodev-linux-devel mailing list Cryptodev-linux-devel@gna.org https://mail.gna.org/listinfo/cryptodev-linux-devel