
From: Chenghai Huang <huangchenghai2@huawei.com> The meaning of the sess parameter of the AEAD in the inspection report is incorrect. The EACCES error code is misspelled. Signed-off-by: Chenghai Huang <huangchenghai2@huawei.com> --- include/wd.h | 2 +- wd_aead.c | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/include/wd.h b/include/wd.h index 80982b0..bcf3aa7 100644 --- a/include/wd.h +++ b/include/wd.h @@ -83,7 +83,7 @@ typedef void (*wd_log)(const char *format, ...); #define WD_EIO EIO #define WD_EAGAIN EAGAIN #define WD_ENOMEM ENOMEM -#define WD_EACCESS EACCESS +#define WD_EACCES EACCES #define WD_EBUSY EBUSY #define WD_EEXIST EEXIST #define WD_ENODEV ENODEV diff --git a/wd_aead.c b/wd_aead.c index c0a7cfc..9c3f1ab 100644 --- a/wd_aead.c +++ b/wd_aead.c @@ -243,7 +243,7 @@ int wd_aead_set_authsize(handle_t h_sess, __u16 authsize) struct wd_aead_sess *sess = (struct wd_aead_sess *)h_sess; if (!sess) { - WD_ERR("failed to check session parameter!\n"); + WD_ERR("invalid: aead input sess is NULL!\n"); return -WD_EINVAL; } @@ -282,7 +282,7 @@ int wd_aead_get_authsize(handle_t h_sess) struct wd_aead_sess *sess = (struct wd_aead_sess *)h_sess; if (!sess) { - WD_ERR("failed to check session parameter!\n"); + WD_ERR("invalid: aead input sess is NULL!\n"); return -WD_EINVAL; } @@ -294,7 +294,7 @@ int wd_aead_get_maxauthsize(handle_t h_sess) struct wd_aead_sess *sess = (struct wd_aead_sess *)h_sess; if (!sess || sess->dalg >= WD_DIGEST_TYPE_MAX) { - WD_ERR("failed to check session parameter!\n"); + WD_ERR("invalid: aead input sess is NULL or invalid alg type!\n"); return -WD_EINVAL; } @@ -359,7 +359,7 @@ void wd_aead_free_sess(handle_t h_sess) struct wd_aead_sess *sess = (struct wd_aead_sess *)h_sess; if (unlikely(!sess)) { - WD_ERR("failed to check session parameter!\n"); + WD_ERR("invalid: aead input sess is NULL!\n"); return; } -- 2.33.0