From patchwork Mon Mar 28 23:28:23 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Thibault X-Patchwork-Id: 8680631 Return-Path: X-Original-To: patchwork-qemu-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id B55099F36E for ; Mon, 28 Mar 2016 23:28:48 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 2B7AD201ED for ; Mon, 28 Mar 2016 23:28:48 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id DFBA0201FE for ; Mon, 28 Mar 2016 23:28:45 +0000 (UTC) Received: from localhost ([::1]:43462 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1akgaT-0008CF-6s for patchwork-qemu-devel@patchwork.kernel.org; Mon, 28 Mar 2016 19:28:45 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38968) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1akgaF-0008As-V6 for qemu-devel@nongnu.org; Mon, 28 Mar 2016 19:28:32 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1akgaD-0002vv-JB for qemu-devel@nongnu.org; Mon, 28 Mar 2016 19:28:31 -0400 Received: from sonata.ens-lyon.org ([140.77.166.138]:46946) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1akgaD-0002v6-CG for qemu-devel@nongnu.org; Mon, 28 Mar 2016 19:28:29 -0400 Received: from localhost (localhost [127.0.0.1]) by sonata.ens-lyon.org (Postfix) with ESMTP id 7BA4F200D6; Tue, 29 Mar 2016 01:28:27 +0200 (CEST) Received: from sonata.ens-lyon.org ([127.0.0.1]) by localhost (sonata.ens-lyon.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id chwUdqZ-2a-F; Tue, 29 Mar 2016 01:28:27 +0200 (CEST) Received: from var.youpi.perso.aquilenet.fr (LFbn-1-6757-94.w90-120.abo.wanadoo.fr [90.120.189.94]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by sonata.ens-lyon.org (Postfix) with ESMTPSA id EA600200DE; Tue, 29 Mar 2016 01:28:26 +0200 (CEST) Received: from samy by var.youpi.perso.aquilenet.fr with local (Exim 4.86_2) (envelope-from ) id 1akgaA-0004yK-73; Tue, 29 Mar 2016 01:28:26 +0200 From: Samuel Thibault To: qemu-devel@nongnu.org, peter.maydell@linaro.org Date: Tue, 29 Mar 2016 01:28:23 +0200 Message-Id: <1459207704-19055-5-git-send-email-samuel.thibault@ens-lyon.org> X-Mailer: git-send-email 2.8.0.rc3 In-Reply-To: <1459207704-19055-1-git-send-email-samuel.thibault@ens-lyon.org> References: <1459207704-19055-1-git-send-email-samuel.thibault@ens-lyon.org> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 140.77.166.138 Cc: jan.kiszka@siemens.com, Samuel Thibault Subject: [Qemu-devel] [PULL 4/5] Use C99 flexible array instead of 1-byte trailing array X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Peter Maydell Signed-off-by: Peter Maydell Signed-off-by: Samuel Thibault --- slirp/mbuf.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/slirp/mbuf.h b/slirp/mbuf.h index 38fedf4..36fb814 100644 --- a/slirp/mbuf.h +++ b/slirp/mbuf.h @@ -81,11 +81,9 @@ struct mbuf { Slirp *slirp; bool resolution_requested; uint64_t expiration_date; + char *m_ext; /* start of dynamic buffer area, must be last element */ - union { - char m_dat[1]; /* ANSI don't like 0 sized arrays */ - char *m_ext; - }; + char m_dat[]; }; #define ifq_prev m_prev