Ver código fonte

scripts: Do not use sprintf for functions supporting variable args

Guillem Jover 17 anos atrás
pai
commit
af77eb7214
2 arquivos alterados com 8 adições e 2 exclusões
  1. 5 0
      ChangeLog
  2. 3 2
      scripts/Dpkg/Deps.pm

+ 5 - 0
ChangeLog

@@ -1,3 +1,8 @@
+2008-12-08  Guillem Jover  <guillem@debian.org>
+
+	* scripts/Dpkg/Deps.pm (parse): Do not use sprintf for warning.
+	(implies): Do not use sprintf for internerr.
+
 2008-12-08  Guillem Jover  <guillem@debian.org>
 
 	* dpkg-deb/build.c (do_build): Use internerr instead of ohshit. Do not

+ 3 - 2
scripts/Dpkg/Deps.pm

@@ -310,7 +310,7 @@ sub parse {
         foreach my $dep_or (split(/\s*\|\s*/m, $dep_and)) {
 	    my $dep_simple = Dpkg::Deps::Simple->new($dep_or);
 	    if (not defined $dep_simple->{package}) {
-		warning(sprintf(_g("can't parse dependency %s"), $dep_and));
+		warning(_g("can't parse dependency %s"), $dep_and);
 		return undef;
 	    }
 	    $dep_simple->{arches} = undef if not $options{use_arch};
@@ -623,7 +623,8 @@ sub implies {
 	}
 	return $res;
     } else {
-	internerr(sprintf(_g("Dpkg::Deps::Simple can't evaluate implication with a %s!"), ref($o)));
+	internerr(_g("Dpkg::Deps::Simple can't evaluate implication with a %s!"),
+	          ref($o));
     }
 }