Merge pull request #10095 from imzyxwvu/nb-validation

lib: Do not use sizeof() on `size_t errmsg_len`.
This commit is contained in:
Igor Ryzhov 2021-11-18 19:52:32 +03:00 committed by GitHub
commit 40d954f649
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -830,8 +830,7 @@ int nb_candidate_validate(struct nb_context *context,
struct nb_config_cbs changes; struct nb_config_cbs changes;
int ret; int ret;
if (nb_candidate_validate_yang(candidate, errmsg, sizeof(errmsg_len)) if (nb_candidate_validate_yang(candidate, errmsg, errmsg_len) != NB_OK)
!= NB_OK)
return NB_ERR_VALIDATION; return NB_ERR_VALIDATION;
RB_INIT(nb_config_cbs, &changes); RB_INIT(nb_config_cbs, &changes);