From nobody Mon Sep 15 19:52:09 2025 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 877D3C54EBE for ; Tue, 10 Jan 2023 09:38:47 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238212AbjAJJhy (ORCPT ); Tue, 10 Jan 2023 04:37:54 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49102 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238264AbjAJJhq (ORCPT ); Tue, 10 Jan 2023 04:37:46 -0500 Received: from ssh248.corpemail.net (ssh248.corpemail.net [210.51.61.248]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 577FF48CC2; Tue, 10 Jan 2023 01:37:44 -0800 (PST) Received: from ([60.208.111.195]) by ssh248.corpemail.net ((D)) with ASMTP (SSL) id GCW00136; Tue, 10 Jan 2023 17:37:36 +0800 Received: from localhost.localdomain (10.200.104.97) by jtjnmail201602.home.langchao.com (10.100.2.2) with Microsoft SMTP Server id 15.1.2507.16; Tue, 10 Jan 2023 17:37:37 +0800 From: Bo Liu To: , , CC: , , Bo Liu Subject: [PATCH] sctp: Replace zero-length array with DECLARE_FLEX_ARRAY() helper Date: Tue, 10 Jan 2023 04:37:33 -0500 Message-ID: <20230110093733.2398-1-liubo03@inspur.com> X-Mailer: git-send-email 2.18.2 MIME-Version: 1.0 X-Originating-IP: [10.200.104.97] tUid: 20231101737362e6d41f64e2f9a5dacfb37411163b93c X-Abuse-Reports-To: service@corp-email.com Abuse-Reports-To: service@corp-email.com X-Complaints-To: service@corp-email.com X-Report-Abuse-To: service@corp-email.com Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Zero-length arrays are deprecated and we are moving towards adopting C99 flexible-array members instead. So, replace zero-length array declaration in struct fid with the new DECLARE_FLEX_ARRAY() helper macro. This helper allows for a flexible-array member in a union. Signed-off-by: Bo Liu --- include/linux/sctp.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/sctp.h b/include/linux/sctp.h index 358dc08e0831..09fdb7206f08 100644 --- a/include/linux/sctp.h +++ b/include/linux/sctp.h @@ -239,7 +239,7 @@ struct sctp_idatahdr { __u32 ppid; __be32 fsn; }; - __u8 payload[0]; + DECLARE_FLEX_ARRAY(__u8, payload); }; =20 struct sctp_idata_chunk { --=20 2.27.0