aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Prestwood <prestwoj@gmail.com>2022-07-26 09:34:59 -0700
committerDenis Kenzior <denkenz@gmail.com>2022-07-26 12:07:37 -0500
commit5e7d851a7663b1d5ce8e7ee37222b0174d480280 (patch)
tree2637851cdee6e815a97110c8d1617a9bcfcb6424
parentb31079f829638c2e9128ed80729f9a3ca42e3319 (diff)
genl: make l_genl_attr_recurse take a const pointer
The outer attribute iterator should be const since its not being modified.
-rw-r--r--ell/genl.c2
-rw-r--r--ell/genl.h3
2 files changed, 3 insertions, 2 deletions
diff --git a/ell/genl.c b/ell/genl.c
index 2cae2f08..2c873efd 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 7e5b7bba..42041fa5 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);