zsh-workers
 help / color / mirror / code / Atom feed
From: "Bart Schaefer" <schaefer@candle.brasslantern.com>
To: Zsh workers <zsh-workers@sunsite.auc.dk>
Subject: PATCH: Re: Seg fault with zmodload -u
Date: Tue, 15 Aug 2000 16:46:59 +0000	[thread overview]
Message-ID: <1000815164659.ZM19734@candle.brasslantern.com> (raw)
In-Reply-To: <20000815175602.A25814@picard.franken.de>

Unintentional re-use of a local variable name.

And stuff in some horizontal whitespace, as long as I'm here.

Index: Src/module.c
===================================================================
RCS file: /extra/cvsroot/zsh/zsh-3.1/Src/module.c,v
retrieving revision 1.36
diff -u -r1.36 module.c
--- module.c	2000/08/08 15:24:41	1.36
+++ module.c	2000/08/15 16:45:44
@@ -1142,23 +1142,24 @@
 {
     LinkNode node;
     Module m;
-    if(ops['u']) {
+    if (ops['u']) {
 	/* remove dependencies, which can't pertain to aliases */
 	const char *tnam = *args++;
 	node = find_module(tnam, 1, &tnam);
 	if (!node)
 	    return 0;
 	m = (Module) getdata(node);
-	if(*args && m->deps) {
+	if (*args && m->deps) {
 	    do {
-		for(node = firstnode(m->deps); node; incnode(node))
-		    if(!strcmp(*args, getdata(node))) {
-			zsfree(getdata(node));
-			remnode(m->deps, node);
+		LinkNode dnode;
+		for (dnode = firstnode(m->deps); dnode; incnode(dnode))
+		    if (!strcmp(*args, getdata(dnode))) {
+			zsfree(getdata(dnode));
+			remnode(m->deps, dnode);
 			break;
 		    }
 	    } while(*++args);
-	    if(empty(m->deps)) {
+	    if (empty(m->deps)) {
 		freelinklist(m->deps, freestr);
 		m->deps = NULL;
 	    }
@@ -1171,13 +1172,13 @@
 	if (!m->deps && !m->u.handle)
 	    delete_module(node);
 	return 0;
-    } else if(!args[0] || !args[1]) {
+    } else if (!args[0] || !args[1]) {
 	/* list dependencies */
 	for (node = firstnode(modules); node; incnode(node)) {
 	    m = (Module) getdata(node);
 	    if (m->deps && (!args[0] || !strcmp(args[0], m->nam))) {
 		LinkNode n;
-		if(ops['L']) {
+		if (ops['L']) {
 		    printf("zmodload -d ");
 		    if(m->nam[0] == '-')
 			fputs("-- ", stdout);
@@ -1202,7 +1203,7 @@
 	int ret = 0;
 	char *tnam = *args++;
 
-	for(; *args; args++)
+	for (; *args; args++)
 	    add_dep(tnam, *args);
 	return ret;
     }

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com

Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net   


  reply	other threads:[~2000-08-15 16:47 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-08-15 15:18 Oliver Kiddle
2000-08-15 15:40 ` Thomas Köhler
2000-08-15 15:48   ` Thomas Köhler
2000-08-15 15:56     ` Thomas Köhler
2000-08-15 16:46       ` Bart Schaefer [this message]
2000-08-15 15:43 ` Andrej Borsenkow
2000-08-15 15:49   ` Andrej Borsenkow
2000-08-15 15:52 ` Peter Stephenson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1000815164659.ZM19734@candle.brasslantern.com \
    --to=schaefer@candle.brasslantern.com \
    --cc=zsh-workers@sunsite.auc.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).