summaryrefslogtreecommitdiff
path: root/ext/socket/ancdata.c
diff options
context:
space:
mode:
authornormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-06-05 22:21:47 +0000
committernormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-06-05 22:21:47 +0000
commit5a67d8e2e9cac2bdd41c588fc13e041759028ce0 (patch)
tree06f501c425bafe2187d5f7665c6cea5adee71724 /ext/socket/ancdata.c
parent6f586ac405ece968b7e85c88075399cdfb7c47a1 (diff)
* 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/socket/ancdata.c')
-rw-r--r--ext/socket/ancdata.c4
1 files changed, 0 insertions, 4 deletions
diff --git a/ext/socket/ancdata.c b/ext/socket/ancdata.c
index 756cf7e..6e59694 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);