[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20160614165136.51b6d4ff@xeon-e3>
Date: Tue, 14 Jun 2016 16:51:36 -0700
From: Stephen Hemminger <shemming@...cade.com>
To: Phil Sutter <phil@....cc>
CC: <netdev@...r.kernel.org>, Phil Sutter <psutter@...hat.com>
Subject: Re: [iproute PATCH 1/2] tc: m_action: Fix for field init before
memset
On Wed, 15 Jun 2016 00:26:08 +0200
Phil Sutter <phil@....cc> wrote:
> From: Phil Sutter <psutter@...hat.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@....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.
Powered by blists - more mailing lists