sm-commit AT lists.ibiblio.org
Subject: Source Mage code commit list
List archive
Re: [SM-Commit] GIT changes to master sorcery by Jaka Kranjc (24e9e3d9e230efb021c291b7ddfc56369af7119a)
- From: flux <flux AT sourcemage.org>
- To: sm-commit AT lists.ibiblio.org
- Subject: Re: [SM-Commit] GIT changes to master sorcery by Jaka Kranjc (24e9e3d9e230efb021c291b7ddfc56369af7119a)
- Date: Sat, 2 Feb 2008 18:47:04 -0500
Jaka Kranjc (scm AT sourcemage.org) wrote [08.02.02 14:25]:
> commit c077ab066836492ff1294441e8c7a54ff3c653ad
> Author: Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
> Commit: Jaka Kranjc <lynxlynxlynx AT sourcemage.org>
<snip>
> diff --git a/var/lib/sorcery/modules/libunpack
> b/var/lib/sorcery/modules/libunpack
> index 073137e..48b872c 100755
> --- a/var/lib/sorcery/modules/libunpack
> +++ b/var/lib/sorcery/modules/libunpack
> @@ -399,7 +399,13 @@ function unpack_gpg() {
> rc="$?"
> case "$rc" in
> 0)
> - if is_allowed_hash $GPGALGO_USED $GPGLEVEL ; then rc=0 ; else rc=1 ;
> fi
> + local algo
> + for algo in $GPGALGO_USED; do
> + if is_allowed_hash "$algo" "$GPGLEVEL"; then
> + rc=0
> + break
> + fi
> + done
> ;;
</snip>
Should the setting of rc inside the for loop be rc=$? instead of rc=0?
Since the for loop occurs inside of a case where rc already is 0,
setting rc=0 again seems like duplication/wasted code. Also, the
original if statement included a case where the algo failed
is_allowed_hash and subsequently rc=1. Is it really only supposed to be
rc=0 here and I am missing something, or is this in fact an error?
--
Justin "flux" Boffemmyer
Cauldron wizard and general mage
Source Mage GNU/Linux
http://www.sourcemage.org
Attachment:
pgp_olWwcQJ4V.pgp
Description: PGP signature
-
[SM-Commit] GIT changes to master sorcery by Jaka Kranjc (24e9e3d9e230efb021c291b7ddfc56369af7119a),
Jaka Kranjc, 02/02/2008
- Re: [SM-Commit] GIT changes to master sorcery by Jaka Kranjc (24e9e3d9e230efb021c291b7ddfc56369af7119a), flux, 02/02/2008
Archive powered by MHonArc 2.6.24.