From: Eric Wong Date: Wed, 19 Jun 2024 23:41:00 +0000 (+0000) Subject: ds: remove needless O_APPEND import X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=816475ce233cddbf1f110fc30cba547c81b03b40;p=thirdparty%2Fpublic-inbox.git ds: remove needless O_APPEND import tmpfile doesn't require O_APPEND to be specified, just a boolean for whether or not the file requires O_APPEND. --- diff --git a/lib/PublicInbox/DS.pm b/lib/PublicInbox/DS.pm index a6fec9546..ae0525dcb 100644 --- a/lib/PublicInbox/DS.pm +++ b/lib/PublicInbox/DS.pm @@ -25,7 +25,7 @@ use v5.10.1; use parent qw(Exporter); use bytes qw(length substr); # FIXME(?): needed for PublicInbox::NNTP use POSIX qw(WNOHANG sigprocmask SIG_SETMASK SIG_UNBLOCK); -use Fcntl qw(SEEK_SET :DEFAULT O_APPEND); +use Fcntl qw(SEEK_SET :DEFAULT); use Time::HiRes qw(clock_gettime CLOCK_MONOTONIC); use Scalar::Util qw(blessed); use PublicInbox::Syscall qw(%SIGNUM @@ -471,7 +471,7 @@ sub drop { sub tmpio ($$$) { my ($self, $bref, $off) = @_; - my $fh = tmpfile('wbuf', $self->{sock}, O_APPEND) or + my $fh = tmpfile 'wbuf', $self->{sock}, 1 or return drop($self, "tmpfile $!"); $fh->autoflush(1); my $len = length($$bref) - $off;