summaryrefslogtreecommitdiff
path: root/usr.sbin/pkg_add/OpenBSD
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2007-02-22 21:40:40 +0000
committerMarc Espie <espie@cvs.openbsd.org>2007-02-22 21:40:40 +0000
commit2c4ce6e834894a2a5c7589e1ceaafc28a482b597 (patch)
tree2e4f369435242d4e994142985a40ac0743cf6a82 /usr.sbin/pkg_add/OpenBSD
parent46864b7a70f890543f59f2ffec2f0fcec3a00111 (diff)
avoid undefined. closes pr5386.
Diffstat (limited to 'usr.sbin/pkg_add/OpenBSD')
-rw-r--r--usr.sbin/pkg_add/OpenBSD/Ustar.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/Ustar.pm b/usr.sbin/pkg_add/OpenBSD/Ustar.pm
index 32f39253bda..2f5f85bd585 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.43 2006/11/17 15:34:15 espie Exp $
+# $OpenBSD: Ustar.pm,v 1.44 2007/02/22 21:40:39 espie Exp $
#
# Copyright (c) 2002-2004 Marc Espie <espie@openbsd.org>
#
@@ -100,7 +100,7 @@ sub next
$self->skip();
my $header;
my $n = read $self->{fh}, $header, 512;
- return if $n == 0;
+ return if (defined $n) and $n == 0;
die "Error while reading header"
unless defined $n and $n == 512;
if ($header eq "\0"x512) {