[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 3/3] tools/libxenstat: fix output initialisation in parseNetDevLine()


  • To: Olivier Lambert <olivier.lambert@xxxxxxxxxx>
  • From: Baptiste Le Duc <baptiste.le-duc@xxxxxxxxxx>
  • Date: Fri, 16 Oct 2026 13:55:37 +0200
  • Authentication-results: eu.smtp.expurgate.cloud; dkim=pass header.s=selector1 header.d=vates.tech header.i="@vates.tech" header.h="From:Subject:Date:Message-ID:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding:In-Reply-To:References:Feedback-ID"
  • Cc: xen-devel@xxxxxxxxxxxxxxxxxxxx, Anthony PERARD <anthony.perard@xxxxxxxxxx>, Juergen Gross <jgross@xxxxxxxx>, Jason Andryuk <jason.andryuk@xxxxxxx>
  • Delivery-date: Fri, 16 Oct 2026 11:55:52 +0000
  • Feedback-id: default:8631fc262581453bbf619ec5b2062170:Sweego
  • List-id: Xen developer discussion <xen-devel.lists.xenproject.org>

> parseNetDevLine() zeroes all the outputs it is passed before parsing the
> line, but *rxPackets is zeroed twice while *rxMcast isn't zeroed at all,
> so it would be left untouched for a line that doesn't parse.
> 
> Also, iface is cleared with memset(iface, 0, sizeof(*iface)), which only
> covers the first byte. The function isn't told the buffer size, and an
> empty string is all that's needed, so write the terminator directly.
> 
> No functional change intended: the only caller passes NULL for rxMcast.
> 
> Assisted-by: Claude-Code:claude-opus-5-5
> Signed-off-by: Olivier Lambert <olivier.lambert@xxxxxxxxxx>
> ---
The subject says "fix", but the body says no functional change. Either
it's a bug fix and wants a Fixes: tag, or it isn't, and then I'd use
Amends: 1fd93d4f8cb8 ("xenstat: Linux dom0 statistics for case we use
network bonding") and drop "fix" from the subject. Based on the changes, I 
think the latter.

-- 
Baptiste Le Duc <baptiste.le-duc@xxxxxxxxxx>



 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.