summaryrefslogtreecommitdiff
path: root/libexec
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2010-07-13 15:38:28 +0000
committerMarc Espie <espie@cvs.openbsd.org>2010-07-13 15:38:28 +0000
commit88f890ef01aa8dcb885fc28a19c9d6685b4c7683 (patch)
tree330bf6f8ef864bcb8f5d2694ed43137ab6fcd0e8 /libexec
parentd37866b54c47fd87c388f45a22ca43b60ac04f42 (diff)
work around a strange problem in locality of @_ by copying stuff.
okay millert@
Diffstat (limited to 'libexec')
-rw-r--r--libexec/makewhatis/OpenBSD/Makewhatis.pm8
1 files changed, 4 insertions, 4 deletions
diff --git a/libexec/makewhatis/OpenBSD/Makewhatis.pm b/libexec/makewhatis/OpenBSD/Makewhatis.pm
index aaa922e7458..0283a254804 100644
--- a/libexec/makewhatis/OpenBSD/Makewhatis.pm
+++ b/libexec/makewhatis/OpenBSD/Makewhatis.pm
@@ -1,5 +1,5 @@
# ex:ts=8 sw=4:
-# $OpenBSD: Makewhatis.pm,v 1.7 2010/07/09 08:12:49 espie Exp $
+# $OpenBSD: Makewhatis.pm,v 1.8 2010/07/13 15:38:27 espie Exp $
# Copyright (c) 2000-2004 Marc Espie <espie@openbsd.org>
#
# Permission to use, copy, modify, and distribute this software for any
@@ -51,10 +51,10 @@ sub f
if (@_ == 0) {
return '';
}
- my $_ = shift;
+ my ($_, @l) = @_;
# make it so that #0 is #
- unshift(@_, '#');
- s/\#(\d+)/$_[$1]/ge;
+ unshift(@l, '#');
+ s/\#(\d+)/$l[$1]/ge;
return $_;
}