* 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
This commit is contained in:
normal 2015-06-05 22:21:47 +00:00
Родитель 6f586ac405
Коммит 5a67d8e2e9
2 изменённых файлов: 4 добавлений и 4 удалений

Просмотреть файл

@ -1,3 +1,7 @@
Sat Jun 6 07:08:45 2015 Eric Wong <e@80x24.org>
* ext/socket/ancdata.c (bsock_sendmsg_internal): drop redundant assignment
Sat Jun 6 01:00:06 2015 Naohisa Goto <ngotogenome@gmail.com>
* ext/socket/ancdata.c (bsock_sendmsg_internal): all arguments are

Просмотреть файл

@ -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);