From: Stephen Hemminger <shemming@brocade.com>
To: Phil Sutter <phil@nwl.cc>
Cc: <netdev@vger.kernel.org>, Phil Sutter <psutter@redhat.com>
Subject: Re: [iproute PATCH 1/2] tc: m_action: Fix for field init before memset
Date: Tue, 14 Jun 2016 16:51:36 -0700 [thread overview]
Message-ID: <20160614165136.51b6d4ff@xeon-e3> (raw)
In-Reply-To: <1465943169-4101-2-git-send-email-phil@nwl.cc>
On Wed, 15 Jun 2016 00:26:08 +0200
Phil Sutter <phil@nwl.cc> wrote:
> From: Phil Sutter <psutter@redhat.com>
>
> Initializing req.t.tca_family before setting the whole req object to
> zero using memset does not make sense. Instead initialize the field
> after calling memset.
>
> Note that this change has no functional effect since AF_UNSPEC is
> defined to 0 anyway, so this fix is a purely cosmetic one.
>
> Signed-off-by: Phil Sutter <phil@nwl.cc>
Instead of moving around the code with memset(), it would make more
sense to change this and other places to use C99 style initializers.
They are safer and the code is cleaner.
next prev parent reply other threads:[~2016-06-14 23:51 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-14 22:26 [iproute PATCH 0/2] Two cosmetic fixes in tc/m_action.c Phil Sutter
2016-06-14 22:26 ` [iproute PATCH 1/2] tc: m_action: Fix for field init before memset Phil Sutter
2016-06-14 23:51 ` Stephen Hemminger [this message]
2016-06-14 22:26 ` [iproute PATCH 2/2] tc: m_action: Drop unused variable nladdr in tc_action_gd() Phil Sutter
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=20160614165136.51b6d4ff@xeon-e3 \
--to=shemming@brocade.com \
--cc=netdev@vger.kernel.org \
--cc=phil@nwl.cc \
--cc=psutter@redhat.com \
/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).