summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2009-11-11 12:59:35 +0000
committerMarc Espie <espie@cvs.openbsd.org>2009-11-11 12:59:35 +0000
commit88f15ea5bcc548441e3b1f24c3b74e85c821d54d (patch)
tree20f278bf2381a7c1327e8f6cc25fda88d2311ba3
parent8cb975a940a3d400dcf0d600e7f4a7b81289203e (diff)
remove extra warnings
-rw-r--r--usr.sbin/pkg_add/OpenBSD/ArcCheck.pm5
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/ArcCheck.pm b/usr.sbin/pkg_add/OpenBSD/ArcCheck.pm
index 96c308fd646..0d243d8b4e8 100644
--- a/usr.sbin/pkg_add/OpenBSD/ArcCheck.pm
+++ b/usr.sbin/pkg_add/OpenBSD/ArcCheck.pm
@@ -1,5 +1,5 @@
# ex:ts=8 sw=4:
-# $OpenBSD: ArcCheck.pm,v 1.13 2009/11/10 11:36:56 espie Exp $
+# $OpenBSD: ArcCheck.pm,v 1.14 2009/11/11 12:59:34 espie Exp $
#
# Copyright (c) 2005-2006 Marc Espie <espie@openbsd.org>
#
@@ -132,7 +132,8 @@ sub prepare_long
$self->{name_index} = 0 if !defined $self->{name_index};
$entry->set_name('LongName'.$self->{name_index}++);
}
- if (length($entry->{linkname}) > MAXLINKNAME) {
+ if ((defined $entry->{linkname}) &&
+ length($entry->{linkname}) > MAXLINKNAME) {
$self->{linkname_index} = 0 if !defined $self->{linkname_index};
$entry->{linkname} = 'LongLink'.$self->{linkname_index}++;
}