From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: AS47066 71.19.144.0/20 X-Spam-Status: No, score=-1.9 required=3.0 tests=AWL,BAYES_00, MSGID_FROM_MTA_HEADER shortcircuit=no autolearn=unavailable version=3.3.2 Path: news.gmane.org!not-for-mail From: Eric Wong Newsgroups: gmane.comp.lang.ruby.raindrops.general Subject: [PATCH 1/3] linux_inet_diag: avoid unnecessary sockaddr initialization Date: Sat, 13 Apr 2013 02:25:15 +0000 Message-ID: <1365819917-27535-1-git-send-email-normalperson@yhbt.net> References: <1365819917-27535-1-git-send-email-normalperson@yhbt.net> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1365819945 19015 80.91.229.3 (13 Apr 2013 02:25:45 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 13 Apr 2013 02:25:45 +0000 (UTC) To: raindrops@librelist.org Original-X-From: raindrops@librelist.org Sat Apr 13 04:25:49 2013 Return-path: Envelope-to: gclrrg-raindrops@m.gmane.org In-Reply-To: <1365819917-27535-1-git-send-email-normalperson@yhbt.net> List-Archive: List-Help: List-Id: List-Post: List-Subscribe: List-Unsubscribe: Precedence: list Original-Sender: raindrops@librelist.org Xref: news.gmane.org gmane.comp.lang.ruby.raindrops.general:109 Archived-At: Received: from zedshaw2.xen.prgmr.com ([71.19.156.177]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1UQqA0-00089b-AY for gclrrg-raindrops@m.gmane.org; Sat, 13 Apr 2013 04:25:48 +0200 Received: from zedshaw2.xen.prgmr.com (unknown [IPv6:::1]) by zedshaw2.xen.prgmr.com (Postfix) with ESMTP id 5585F73DFB for ; Sat, 13 Apr 2013 02:26:11 +0000 (UTC) This initialization was unnecessary and avoids the following warning with -Wmissing-braces on gcc 4.7.2-5 on Debian testing: linux_inet_diag.c: In function =E2=80=98stats_for=E2=80=99: linux_inet_diag.c:192:8: warning: missing braces around initializer [-W= missing-braces] linux_inet_diag.c:192:8: warning: (near initialization for =E2=80=98sa.= ss=E2=80=99) [-Wmissing-braces] --- ext/raindrops/linux_inet_diag.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/raindrops/linux_inet_diag.c b/ext/raindrops/linux_inet_d= iag.c index 89206bf..d94dafd 100644 --- a/ext/raindrops/linux_inet_diag.c +++ b/ext/raindrops/linux_inet_diag.c @@ -189,7 +189,7 @@ static struct listen_stats *stats_for(st_table *table= , struct inet_diag_msg *r) struct listen_stats *stats; size_t keylen; size_t portlen =3D sizeof("65535"); - union any_addr sa =3D { 0 }; + union any_addr sa; socklen_t len =3D sizeof(struct sockaddr_storage); int rc; int flags =3D NI_NUMERICHOST | NI_NUMERICSERV; --=20 1.8.2.1.366.ge2af9e3