From 5a67d8e2e9cac2bdd41c588fc13e041759028ce0 Mon Sep 17 00:00:00 2001 From: normal Date: Fri, 5 Jun 2015 22:21:47 +0000 Subject: * ext/socket/ancdata.c (bsock_sendmsg_internal): drop redundant assignment We call memset to zero `mh' a few lines above anyways, making explicitly zero-ing each field unnecessary. Compilers optimize this code away anyways, but it still costs me 4 lines of my small terminal and even smaller attention span. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50786 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ext/socket/ancdata.c | 4 ---- 1 file changed, 4 deletions(-) (limited to 'ext/socket/ancdata.c') diff --git a/ext/socket/ancdata.c b/ext/socket/ancdata.c index 756cf7ed64..6e59694723 100644 --- a/ext/socket/ancdata.c +++ b/ext/socket/ancdata.c @@ -1268,10 +1268,6 @@ bsock_sendmsg_internal(int argc, VALUE *argv, VALUE sock, int nonblock) mh.msg_control = RSTRING_PTR(controls_str); mh.msg_controllen = RSTRING_SOCKLEN(controls_str); } - else { - mh.msg_control = NULL; - mh.msg_controllen = 0; - } #endif rb_io_check_closed(fptr); -- cgit v1.2.3