raindrops RubyGem user+dev discussion/patches/pulls/bugs/help
 help / Atom feed
From: Eric Wong <normalperson@yhbt.net>
To: raindrops@librelist.org
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> (raw)
In-Reply-To: <1365819917-27535-1-git-send-email-normalperson@yhbt.net>

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 ‘stats_for’:
  linux_inet_diag.c:192:8: warning: missing braces around initializer [-Wmissing-braces]
  linux_inet_diag.c:192:8: warning: (near initialization for ‘sa.ss’) [-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_diag.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 = sizeof("65535");
-	union any_addr sa = { 0 };
+	union any_addr sa;
 	socklen_t len = sizeof(struct sockaddr_storage);
 	int rc;
 	int flags = NI_NUMERICHOST | NI_NUMERICSERV;
-- 
1.8.2.1.366.ge2af9e3



       reply index

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-13  2:25 Eric Wong [this message]
2013-04-13  2:25 ` [PATCH 2/3] .gitignore: add .rbx Eric Wong
2013-04-13  2:25 ` [PATCH 3/3] switch back to gemspec development dependencies Eric Wong

Reply instructions:

You may reply publically to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://bogomips.org/raindrops/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1365819917-27535-1-git-send-email-normalperson@yhbt.net \
    --to=normalperson@yhbt.net \
    --cc=raindrops@librelist.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

raindrops RubyGem user+dev discussion/patches/pulls/bugs/help

Archives are clonable:
	git clone --mirror https://bogomips.org/raindrops-public
	git clone --mirror http://ou63pmih66umazou.onion/raindrops-public

Newsgroups are available over NNTP:
	nntp://news.public-inbox.org/inbox.comp.lang.ruby.raindrops
	nntp://ou63pmih66umazou.onion/inbox.comp.lang.ruby.raindrops

 note: .onion URLs require Tor: https://www.torproject.org/
       or Tor2web: https://www.tor2web.org/

AGPL code for this site: git clone https://public-inbox.org/ public-inbox