From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21986 invoked from network); 8 Aug 2005 18:15:47 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 8 Aug 2005 18:15:47 -0000 Received: (qmail 13464 invoked from network); 8 Aug 2005 18:15:40 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 8 Aug 2005 18:15:40 -0000 Received: (qmail 5554 invoked by alias); 8 Aug 2005 18:15:38 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 21582 Received: (qmail 5545 invoked from network); 8 Aug 2005 18:15:37 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 8 Aug 2005 18:15:37 -0000 Received: (qmail 13162 invoked from network); 8 Aug 2005 18:15:37 -0000 Received: from mail.gmx.net (213.165.64.20) by a.mx.sunsite.dk with SMTP; 8 Aug 2005 18:15:32 -0000 Received: (qmail invoked by alias); 08 Aug 2005 18:15:31 -0000 Received: from Bc93f.b.pppool.de (EHLO pcdahl4201) [213.7.201.63] by mail.gmx.net (mp026) with SMTP; 08 Aug 2005 20:15:31 +0200 X-Authenticated: #21620914 Message-ID: <02a001c59c46$623dfac0$cc74fea9@pcdahl4201> From: "Thorsten Dahlheimer" To: Subject: PATCH: Fix exit status of zmodload -R Date: Mon, 8 Aug 2005 20:24:12 +0200 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_NextPart_000_0299_01C59C57.236A8B40" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1409 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 X-Y-GMX-Trusted: 0 X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.0.4 This is a multi-part message in MIME format. ------=_NextPart_000_0299_01C59C57.236A8B40 Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: 7bit If zmodload -R fails because the specified module is not an alias, it returns status 0: % zmodload -R zsh/main zmodload: module is not an alias: zsh/main % echo $? 0 A fix is attached. Regards, Thorsten Dahlheimer ------=_NextPart_000_0299_01C59C57.236A8B40 Content-Type: application/octet-stream; name="zmodload.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="zmodload.patch" Index: Src/module.c=0A= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0A= RCS file: /cvsroot/zsh/zsh/Src/module.c,v=0A= retrieving revision 1.18=0A= diff -u -p -r1.18 module.c=0A= --- Src/module.c 20 Jul 2005 16:08:22 -0000 1.18=0A= +++ Src/module.c 8 Aug 2005 14:46:27 -0000=0A= @@ -1043,7 +1043,6 @@ bin_zmodload_alias(char *nam, char **arg=0A= */=0A= LinkNode node;=0A= Module m;=0A= - int ret =3D 0;=0A= =0A= if (!*args) {=0A= if (OPT_ISSET(ops,'R')) {=0A= @@ -1058,7 +1057,7 @@ bin_zmodload_alias(char *nam, char **arg=0A= return 0;=0A= }=0A= =0A= - for (; !ret && *args; args++) {=0A= + for (; *args; args++) {=0A= char *eqpos =3D strchr(*args, '=3D');=0A= char *aliasname =3D eqpos ? eqpos+1 : NULL;=0A= if (eqpos)=0A= @@ -1078,8 +1077,7 @@ bin_zmodload_alias(char *nam, char **arg=0A= m =3D (Module) getdata(node);=0A= if (!(m->flags & MOD_ALIAS)) {=0A= zwarnnam(nam, "module is not an alias: %s", *args, 0);=0A= - ret =3D 1;=0A= - break;=0A= + return 1;=0A= }=0A= delete_module(node);=0A= } else {=0A= ------=_NextPart_000_0299_01C59C57.236A8B40--