From patchwork Wed Jul 11 19:27:03 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jakub Sitnicki X-Patchwork-Id: 942642 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=openvswitch.org (client-ip=140.211.169.12; helo=mail.linuxfoundation.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Received: from mail.linuxfoundation.org (mail.linuxfoundation.org [140.211.169.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 41Qpxd1mDZz9s01 for ; Thu, 12 Jul 2018 05:27:49 +1000 (AEST) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id 893301009; Wed, 11 Jul 2018 19:27:23 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@mail.linuxfoundation.org Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id 46C26BD8 for ; Wed, 11 Jul 2018 19:27:22 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.7.6 Received: from mail-wr1-f48.google.com (mail-wr1-f48.google.com [209.85.221.48]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id CF09C4FA for ; Wed, 11 Jul 2018 19:27:21 +0000 (UTC) Received: by mail-wr1-f48.google.com with SMTP id g6-v6so10371122wrp.0 for ; Wed, 11 Jul 2018 12:27:21 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=gTVcwAL6gR2taMoIc6L7rE8Q4g7zmDrYAFzcB38Yakc=; b=pNEG+kButGsVt80EMKqP45dGdVQeN9M1RIKTq3cTvcfZgDMwEO5N/y1IV6RVpq8LbI eipGy+Sfj0aPdkGiv+K6Ebgij1MgkVbe/RK+1fdJjfbtNTtz7cetlJEGffTKwBq/TJdA 9Aw9uKwXG6ScN/lltkTfKW8Y6jbAAbAnpTmm4X8kwfIP9kitU3kEJuxRTROWijtZI/Ol 1MrOt8tno9c+X0FQIiily3aVdzctl+JKv72kcrrgeg6Y+/L1M4B6lQ+AeXehHXscTxX7 lEBYy4M/KuKHVdBxdUh5xQy/D9WHkouUCY/gE5VYbM20E9qSOkzcjEDGQPLhSE5KGRbc ehRg== X-Gm-Message-State: APt69E2I4D/rbfDlRx/DCJwVPaBbkuMMl3hN1Th4TdnkmQ0JN1ObFqCF w4CSsEO3M5/reTfmmxCT5SmlJREdkUU= X-Google-Smtp-Source: AAOMgpdrvTYUTAgdHytfqg68umRW9jnlIY05o57M7qvl4Wp1PwRfuXv+L/NjvAkEm2f2O+M60ZXLyQ== X-Received: by 2002:adf:af27:: with SMTP id z36-v6mr20617909wrc.59.1531337240318; Wed, 11 Jul 2018 12:27:20 -0700 (PDT) Received: from redhat.com (218.red-2-136-166.dynamicip.rima-tde.net. [2.136.166.218]) by smtp.gmail.com with ESMTPSA id v190-v6sm3744928wme.21.2018.07.11.12.27.19 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 11 Jul 2018 12:27:19 -0700 (PDT) From: Jakub Sitnicki To: dev@openvswitch.org Date: Wed, 11 Jul 2018 21:27:03 +0200 Message-Id: <20180711192717.21409-2-jkbs@redhat.com> X-Mailer: git-send-email 2.14.4 In-Reply-To: <20180711192717.21409-1-jkbs@redhat.com> References: <20180711192717.21409-1-jkbs@redhat.com> X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org Subject: [ovs-dev] [PATCH 01/15] table: Allow default style to be used in an assignment. X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: ovs-dev-bounces@openvswitch.org Errors-To: ovs-dev-bounces@openvswitch.org Type cast lets us use the macro as the RHS expression in assignments (structure copy), apart from the usual case of initialization. Signed-off-by: Jakub Sitnicki --- lib/table.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/table.h b/lib/table.h index 313ac1dd2..220a9818e 100644 --- a/lib/table.h +++ b/lib/table.h @@ -82,7 +82,8 @@ struct table_style { int max_column_width; /* CF_STRING: Limit for column width. */ }; -#define TABLE_STYLE_DEFAULT { TF_LIST, CF_STRING, true, JSSF_SORT, 0 } +#define TABLE_STYLE_DEFAULT \ + (struct table_style) { TF_LIST, CF_STRING, true, JSSF_SORT, 0 } #define TABLE_OPTION_ENUMS \ OPT_NO_HEADINGS, \