raindrops RubyGem user+dev discussion/patches/pulls/bugs/help
 help / color / mirror / Atom feed
* [PATCH 1/3] linux_inet_diag: avoid unnecessary sockaddr initialization
@ 2013-04-13  2:25 Eric Wong
  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
  0 siblings, 2 replies; 3+ messages in thread
From: Eric Wong @ 2013-04-13  2:25 UTC (permalink / raw)
  To: raindrops

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



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-04-13  2:25 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-04-13  2:25 [PATCH 1/3] linux_inet_diag: avoid unnecessary sockaddr initialization Eric Wong
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

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

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://yhbt.net/raindrops-public
	git clone --mirror http://ou63pmih66umazou.onion/raindrops-public

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V1 raindrops-public raindrops-public/ https://yhbt.net/raindrops-public \
		raindrops-public@yhbt.net raindrops-public@bogomips.org raindrops@librelist.org raindrops@librelist.com
	public-inbox-index raindrops-public

Example config snippet for mirrors.
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/

code repositories for the project(s) associated with this inbox:

	raindrops.git

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