diff options
author | normal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-06-05 22:21:47 +0000 |
---|---|---|
committer | normal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2015-06-05 22:21:47 +0000 |
commit | 6287362db4fa9e2ff4223e2fc84190e8b38ef46b (patch) | |
tree | 06f501c425bafe2187d5f7665c6cea5adee71724 /ext | |
parent | be6b166fef0ab816271ef83f49dd7c367984ca3e (diff) | |
download | ruby-6287362db4fa9e2ff4223e2fc84190e8b38ef46b.tar.gz |
* 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
Diffstat (limited to 'ext')
-rw-r--r-- | ext/socket/ancdata.c | 4 |
1 files changed, 0 insertions, 4 deletions
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); |