summaryrefslogtreecommitdiff
path: root/usr.sbin/pkg_add/OpenBSD/Ustar.pm
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2010-06-30 10:10:18 +0000
committerMarc Espie <espie@cvs.openbsd.org>2010-06-30 10:10:18 +0000
commit3caa152bbb71c57ce2388d716d1d4e5a4305a148 (patch)
tree6913ade7e99a0ed1669426c42b81fc1405a61559 /usr.sbin/pkg_add/OpenBSD/Ustar.pm
parent80e29c1215ea66b1cb05c7b94fd8e1e9c44c2728 (diff)
slightly better error handling
Diffstat (limited to 'usr.sbin/pkg_add/OpenBSD/Ustar.pm')
-rw-r--r--usr.sbin/pkg_add/OpenBSD/Ustar.pm7
1 files changed, 2 insertions, 5 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/Ustar.pm b/usr.sbin/pkg_add/OpenBSD/Ustar.pm
index 1a5db7210b2..8f8617db5a3 100644
--- a/usr.sbin/pkg_add/OpenBSD/Ustar.pm
+++ b/usr.sbin/pkg_add/OpenBSD/Ustar.pm
@@ -1,5 +1,5 @@
# ex:ts=8 sw=4:
-# $OpenBSD: Ustar.pm,v 1.56 2010/05/10 09:17:55 espie Exp $
+# $OpenBSD: Ustar.pm,v 1.57 2010/06/30 10:10:17 espie Exp $
#
# Copyright (c) 2002-2007 Marc Espie <espie@openbsd.org>
#
@@ -569,10 +569,7 @@ use constant {
sub new
{
my ($class, $fname) = @_;
- open (my $out, '>', $fname);
- if (!defined $out) {
- return;
- }
+ open (my $out, '>', $fname) or return;
my $bs = (stat $out)[11];
my $zeroes;
if (defined $bs) {