Message ID | 20220726163500.6171-1-prestwoj@gmail.com (mailing list archive) |
---|---|
State | Accepted, archived |
Headers | show |
Series | [1/2] genl: make l_genl_attr_recurse take a const pointer | expand |
Context | Check | Description |
---|---|---|
tedd_an/pre-ci_am | success | Success |
prestwoj/iwd-ci-makedistcheck | success | Make Distcheck |
prestwoj/iwd-ci-build | success | Build - Configure |
prestwoj/iwd-ci-clang | success | clang PASS |
prestwoj/iwd-ci-makecheckvalgrind | success | Make Check w/Valgrind |
prestwoj/iwd-ci-makecheck | success | Make Check |
prestwoj/iwd-ci-testrunner | success | test-runner PASS |
Hi James, On 7/26/22 11:34, James Prestwood wrote: > The outer attribute iterator should be const since its not being > modified. > --- > ell/genl.c | 2 +- > ell/genl.h | 3 ++- > 2 files changed, 3 insertions(+), 2 deletions(-) > Both applied, thanks. Regards, -Denis
diff --git a/ell/genl.c b/ell/genl.c index 2cae2f0..2c873ef 100644 --- a/ell/genl.c +++ b/ell/genl.c @@ -1761,7 +1761,7 @@ LIB_EXPORT bool l_genl_attr_next(struct l_genl_attr *attr, return true; } -LIB_EXPORT bool l_genl_attr_recurse(struct l_genl_attr *attr, +LIB_EXPORT bool l_genl_attr_recurse(const struct l_genl_attr *attr, struct l_genl_attr *nested) { const struct nlattr *nla; diff --git a/ell/genl.h b/ell/genl.h index 7e5b7bb..42041fa 100644 --- a/ell/genl.h +++ b/ell/genl.h @@ -109,7 +109,8 @@ bool l_genl_msg_leave_nested(struct l_genl_msg *msg); bool l_genl_attr_init(struct l_genl_attr *attr, struct l_genl_msg *msg); bool l_genl_attr_next(struct l_genl_attr *attr, uint16_t *type, uint16_t *len, const void **data); -bool l_genl_attr_recurse(struct l_genl_attr *attr, struct l_genl_attr *nested); +bool l_genl_attr_recurse(const struct l_genl_attr *attr, + struct l_genl_attr *nested); bool l_genl_family_info_has_group(const struct l_genl_family_info *info, const char *group);