diff options
author | 2010-04-24 09:27:15 +0000 | |
---|---|---|
committer | 2010-04-24 09:27:15 +0000 | |
commit | 337db9b4db2f752fbc418c0de4e5ab401055129f (patch) | |
tree | d44dc10a5e717e3a5c5b7d359edb7d7d15623362 | |
parent | This code is only called during autoconf, and never ever from an (diff) | |
download | wireguard-openbsd-337db9b4db2f752fbc418c0de4e5ab401055129f.tar.xz wireguard-openbsd-337db9b4db2f752fbc418c0de4e5ab401055129f.zip |
simplify using //=
-rw-r--r-- | usr.sbin/pkg_add/OpenBSD/Error.pm | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/Error.pm b/usr.sbin/pkg_add/OpenBSD/Error.pm index 0816d4e0374..09b995bdd89 100644 --- a/usr.sbin/pkg_add/OpenBSD/Error.pm +++ b/usr.sbin/pkg_add/OpenBSD/Error.pm @@ -1,5 +1,5 @@ # ex:ts=8 sw=4: -# $OpenBSD: Error.pm,v 1.23 2010/01/19 14:58:53 espie Exp $ +# $OpenBSD: Error.pm,v 1.24 2010/04/24 09:27:15 espie Exp $ # # Copyright (c) 2004-2010 Marc Espie <espie@openbsd.org> # @@ -197,10 +197,7 @@ sub set_pkgname { my ($self, $pkgname) = @_; $self->{pkgname} = $pkgname; - if (!defined $self->{messages}->{$pkgname}) { - $self->{messages}->{$pkgname} = []; - } - $self->{output} = $self->{messages}->{$pkgname}; + $self->{output} = $self->{messages}->{$pkgname} //= []; } sub warn |