public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Dario Binacchi <dario.binacchi@amarulasolutions.com>
To: netdev@vger.kernel.org
Cc: Stephen Hemminger <stephen@networkplumber.org>,
	linux-amarula@amarulasolutions.com,
	Dario Binacchi <dario.binacchi@amarulasolutions.com>
Subject: [iproute2, RESEND PATCH 2/2] arpd: drop useless initializers
Date: Sun, 22 Sep 2024 16:46:13 +0200	[thread overview]
Message-ID: <20240922144613.2103760-2-dario.binacchi@amarulasolutions.com> (raw)
In-Reply-To: <20240922144613.2103760-1-dario.binacchi@amarulasolutions.com>

It is useless to initialize the fields of a structure to their default
values. This patch keeps the initialization only for those fields that
are not set to their default values.

Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
---
 misc/arpd.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/misc/arpd.c b/misc/arpd.c
index b4935c23eebb..a2ae76a41f8d 100644
--- a/misc/arpd.c
+++ b/misc/arpd.c
@@ -439,8 +439,6 @@ static void get_kern_msg(void)
 	struct msghdr msg = {
 		.msg_name = &nladdr, .msg_namelen = sizeof(nladdr),
 		.msg_iov = &iov, .msg_iovlen = 1,
-		.msg_control = (void *)NULL, .msg_controllen = 0,
-		.msg_flags = 0
 	};
 
 	iov.iov_base = buf;
-- 
2.43.0


  reply	other threads:[~2024-09-22 14:46 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-22 14:46 [iproute2, RESEND PATCH 1/2] arpd: use designated initializers for msghdr structure Dario Binacchi
2024-09-22 14:46 ` Dario Binacchi [this message]
2024-09-27 21:06 ` Stephen Hemminger

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=20240922144613.2103760-2-dario.binacchi@amarulasolutions.com \
    --to=dario.binacchi@amarulasolutions.com \
    --cc=linux-amarula@amarulasolutions.com \
    --cc=netdev@vger.kernel.org \
    --cc=stephen@networkplumber.org \
    /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