From: Eric Wong Date: Sat, 18 Jan 2025 01:26:16 +0000 (+0000) Subject: emergency: remove needless $! clobber X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=bb2cb78ffbb7a4b867cc646542cb106b2ffbdc5d;p=thirdparty%2Fpublic-inbox.git emergency: remove needless $! clobber We don't check $! unless `sysopen' fails, and `sysopen' will set $! on failure so there's no need to undef $! ourselves. --- diff --git a/lib/PublicInbox/Emergency.pm b/lib/PublicInbox/Emergency.pm index d3a83408f..7e9faad02 100644 --- a/lib/PublicInbox/Emergency.pm +++ b/lib/PublicInbox/Emergency.pm @@ -39,7 +39,6 @@ sub prepare { my ($tmp, $fh); do { $tmp = _fn_in($self, $pid, 'tmp'); - $! = undef; } while (!sysopen($fh, $tmp, O_CREAT|O_EXCL|O_RDWR) and $! == EEXIST); print $fh $$strref or die "print: $!"; $fh->flush or die "flush: $!";