iwd.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: James Prestwood <prestwoj@gmail.com>
To: iwd@lists.linux.dev
Cc: James Prestwood <prestwoj@gmail.com>
Subject: [PATCH 2/2] frame-xchg: use int length for NLMSG_* macros
Date: Thu, 13 Oct 2022 09:14:24 -0700	[thread overview]
Message-ID: <20221013161424.505633-2-prestwoj@gmail.com> (raw)
In-Reply-To: <20221013161424.505633-1-prestwoj@gmail.com>

The macro expects an integer type so use that to avoid any
unintended behavior as seen in iwmon.
---
 src/frame-xchg.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/frame-xchg.c b/src/frame-xchg.c
index 158befd0..142bd80b 100644
--- a/src/frame-xchg.c
+++ b/src/frame-xchg.c
@@ -316,7 +316,7 @@ static bool frame_watch_group_io_read(struct l_io *io, void *user_data)
 	unsigned char control[32];
 	ssize_t bytes_read;
 	struct nlmsghdr *nlmsg;
-	size_t nlmsg_len;
+	int nlmsg_len;
 	uint32_t nlmsg_group = 0;
 
 	memset(&iov, 0, sizeof(iov));
-- 
2.34.3


      reply	other threads:[~2022-10-13 16:14 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-13 16:14 [PATCH 1/2] monitor: use int length for NLMSG_NEXT James Prestwood
2022-10-13 16:14 ` James Prestwood [this message]

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=20221013161424.505633-2-prestwoj@gmail.com \
    --to=prestwoj@gmail.com \
    --cc=iwd@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 NNTP newsgroup(s).