From c112ffb67b4e79c3c5e049f6993d90da44a1bad3 Mon Sep 17 00:00:00 2001 From: espie Date: Fri, 16 Jun 2023 06:44:14 +0000 Subject: [PATCH] fix default parm, noticed by aja@ on clean-old-distfiles --- usr.sbin/pkg_add/OpenBSD/Getopt.pm | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/usr.sbin/pkg_add/OpenBSD/Getopt.pm b/usr.sbin/pkg_add/OpenBSD/Getopt.pm index eedb555df17..dd363fb71e5 100644 --- a/usr.sbin/pkg_add/OpenBSD/Getopt.pm +++ b/usr.sbin/pkg_add/OpenBSD/Getopt.pm @@ -1,5 +1,5 @@ # ex:ts=8 sw=4: -# $OpenBSD: Getopt.pm,v 1.16 2023/06/13 09:07:17 espie Exp $ +# $OpenBSD: Getopt.pm,v 1.17 2023/06/16 06:44:14 espie Exp $ # # Copyright (c) 2006 Marc Espie # @@ -45,9 +45,8 @@ sub handle_option($opt, $hash, @params) } } -sub getopts($args, $hash) +sub getopts($args, $hash = {}) { - $hash = {} unless defined $hash; local @EXPORT; while ($_ = shift @ARGV) { -- 2.20.1