($INBOX_DIR/description missing)
 help / color / mirror / Atom feed
From: James Prestwood <prestwoj@gmail.com>
To: ell@lists.linux.dev
Cc: James Prestwood <prestwoj@gmail.com>
Subject: [PATCH 1/2] genl: make l_genl_attr_recurse take a const pointer
Date: Tue, 26 Jul 2022 09:34:59 -0700	[thread overview]
Message-ID: <20220726163500.6171-1-prestwoj@gmail.com> (raw)

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(-)

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);
-- 
2.34.3


             reply	other threads:[~2022-07-26 16:35 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-26 16:34 James Prestwood [this message]
2022-07-26 16:35 ` [PATCH 2/2] genl: remove 'msg' from l_genl_attr James Prestwood
2022-07-26 17:08 ` [PATCH 1/2] genl: make l_genl_attr_recurse take a const pointer Denis Kenzior

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220726163500.6171-1-prestwoj@gmail.com \
    --to=prestwoj@gmail.com \
    --cc=ell@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).