]> err.no Git - dpkg/commitdiff
* scripts/update-alternatives.pl: Fix warning when executed w/o any
authorGuillem Jover <guillem@debian.org>
Tue, 8 May 2007 05:03:14 +0000 (05:03 +0000)
committerGuillem Jover <guillem@debian.org>
Tue, 8 May 2007 05:03:14 +0000 (05:03 +0000)
option.

ChangeLog
scripts/update-alternatives.pl

index b1e9a38c1bd861128735ebbcf9ff13e408d25ed2..2abb3ea2056f501e7b51343e7f97afa1584518cd 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2007-05-08  Guillem Jover  <guillem@debian.org>
+
+       * scripts/update-alternatives.pl: Fix warning when executed w/o any
+       option.
+
 2007-05-08  Guillem Jover  <guillem@debian.org>
 
        * Makefile.am (EXTRA_DIST): Rename debian/pseudo-tags to
index c8378fd94d0cdf92a3e0a80824c65d7f365726ae..23c3184003d6fe8d4ef9ebc47c0fb4d535a0df20 100755 (executable)
@@ -281,7 +281,8 @@ while (@ARGV) {
     }
 }
 
-defined($aslavelink{$name}) && &badusage(sprintf(_g("name %s is both primary and slave"), $name));
+defined($name) && defined($aslavelink{$name}) &&
+  badusage(sprintf(_g("name %s is both primary and slave"), $name));
 defined($alink) && $aslavelinkcount{$alink} &&
   badusage(sprintf(_g("link %s is both primary and slave"), $alink));