diff options
author | Marc Espie <espie@cvs.openbsd.org> | 2009-12-05 09:26:43 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 2009-12-05 09:26:43 +0000 |
commit | c677bcc310dc42aedd5d17834ce87a0b9816fd07 (patch) | |
tree | fbed6286a41f1b35064e1c571b3f4781a191f9b8 /usr.sbin | |
parent | 23505b98dddd08823f6a2463c102eac92edbce6c (diff) |
fix off-by-one, noticed by frantisek holop
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/pkg_add/OpenBSD/Delete.pm | 4 | ||||
-rw-r--r-- | usr.sbin/pkg_add/pkg_add | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/Delete.pm b/usr.sbin/pkg_add/OpenBSD/Delete.pm index 331b970c32e..dd98ca17b4c 100644 --- a/usr.sbin/pkg_add/OpenBSD/Delete.pm +++ b/usr.sbin/pkg_add/OpenBSD/Delete.pm @@ -1,5 +1,5 @@ # ex:ts=8 sw=4: -# $OpenBSD: Delete.pm,v 1.89 2009/11/28 09:36:32 espie Exp $ +# $OpenBSD: Delete.pm,v 1.90 2009/12/05 09:26:42 espie Exp $ # # Copyright (c) 2003-2007 Marc Espie <espie@openbsd.org> # @@ -115,7 +115,7 @@ sub delete_package $state->vstat->synchronize; delete_plist($plist, $state); - $state->progress->next($state->{todo}); + $state->progress->next($state->{todo}-1); } sub unregister_dependencies diff --git a/usr.sbin/pkg_add/pkg_add b/usr.sbin/pkg_add/pkg_add index d9ea508eb31..3e86242400b 100644 --- a/usr.sbin/pkg_add/pkg_add +++ b/usr.sbin/pkg_add/pkg_add @@ -1,7 +1,7 @@ #! /usr/bin/perl # ex:ts=8 sw=4: -# $OpenBSD: pkg_add,v 1.411 2009/12/04 10:52:31 espie Exp $ +# $OpenBSD: pkg_add,v 1.412 2009/12/05 09:26:41 espie Exp $ # # Copyright (c) 2003-2009 Marc Espie <espie@openbsd.org> # @@ -490,7 +490,7 @@ sub really_add } } $set->setup_header($state); - $state->progress->next($state->{todo}); + $state->progress->next($state->{todo}-1); for my $handle ($set->newer) { my $pkgname = $handle->pkgname; my $plist = $handle->plist; |