Received: from eggs.gnu.org ([140.186.70.92]:50259) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R1fyA-0005yv-DE for qemu-devel@nongnu.org; Thu, 08 Sep 2011 10:52:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1R1fy2-00038T-F2 for qemu-devel@nongnu.org; Thu, 08 Sep 2011 10:52:46 -0400 Received: from mel.act-europe.fr ([194.98.77.210]:49836) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1R1fy2-00037p-Am for qemu-devel@nongnu.org; Thu, 08 Sep 2011 10:52:38 -0400 From: Elie Richa Date: Thu, 8 Sep 2011 16:51:10 +0200 Message-Id: <1315493470-32346-1-git-send-email-richa@adacore.com> Subject: [Qemu-devel] [PATCH] Flexible array should be last in struct mbuf List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Elie Richa The flexible array member should remain the last member in the structure as this assumption is based upon in the code. Signed-off-by: Elie Richa --- slirp/mbuf.h | 7 ++++--- 1 files changed, 4 insertions(+), 3 deletions(-) diff --git a/slirp/mbuf.h b/slirp/mbuf.h index 55170e5..e13ff71 100644 --- a/slirp/mbuf.h +++ b/slirp/mbuf.h @@ -82,12 +82,13 @@ struct m_hdr { struct mbuf { struct m_hdr m_hdr; Slirp *slirp; + bool arp_requested; + uint64_t expiration_date; union M_dat { char m_dat_[1]; /* ANSI don't like 0 sized arrays */ char *m_ext_; - } M_dat; - bool arp_requested; - uint64_t expiration_date; + } M_dat; /* This is a "flexible array member". It should always remain + the last member of the structure */ }; #define m_next m_hdr.mh_next -- 1.7.4.1