]> Sergey Matveev's repositories - public-inbox.git/commitdiff
ds: new: avoid redundant check, make clobbering fatal
authorEric Wong <e@yhbt.net>
Sun, 12 Jan 2020 21:17:46 +0000 (21:17 +0000)
committerEric Wong <e@yhbt.net>
Mon, 13 Jan 2020 23:21:18 +0000 (23:21 +0000)
"fileno(undef)" already dies under "use strict", so there's no
need to check for it ourselves.  As far as "fileno($closed_io)"
or "fileno($fake_io)" goes, we'll let epoll_ctl detect the
error, instead.

Our design should make DescriptorMap entries impossible to clobber,
so make it fatal via confess in case it does happen, because
inadvertantly clobbering a FD would be very bad.  While we're at
it, remove a redundant return statement and rely on implicit
returns.


No differences found