about summary refs log tree commit diff
diff options
context:
space:
mode:
authorTanaka Akira <akr@users.sourceforge.net>1999-09-15 12:07:43 +0000
committerTanaka Akira <akr@users.sourceforge.net>1999-09-15 12:07:43 +0000
commit2b5c62436ca90898481feda162c2f328681995fe (patch)
tree8aabde1d8f48c725eaafb0e6a7c68672512e0471
parent92881643eeef732af9a99427bb5382e18d1e923e (diff)
downloadzsh-2b5c62436ca90898481feda162c2f328681995fe.tar.gz
zsh-2b5c62436ca90898481feda162c2f328681995fe.tar.xz
zsh-2b5c62436ca90898481feda162c2f328681995fe.zip
zsh-workers/7836
-rw-r--r--Src/Modules/zftp.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Src/Modules/zftp.c b/Src/Modules/zftp.c
index 37a549a63..c2ed8f4ff 100644
--- a/Src/Modules/zftp.c
+++ b/Src/Modules/zftp.c
@@ -2772,7 +2772,7 @@ zftp_rmsession(char *name, char **args, int flags)
     char *newsess = NULL;
 
     /* Find the session in the list: either the current one, or by name */
-    for (no = 0, nptr = firstnode(zfsessions); nptr; no++, nptr++) {
+    for (no = 0, nptr = firstnode(zfsessions); nptr; no++, incnode(nptr)) {
 	sptr = (Zftp_session) nptr->dat;
 	if ((!*args && sptr == zfsess) ||
 	    (*args && !strcmp(sptr->name, *args)))
@@ -2794,7 +2794,7 @@ zftp_rmsession(char *name, char **args, int flags)
 	    LinkNode newn = firstnode(zfsessions);
 	    if (newn == nptr)
 		incnode(newn);
-	    newsess = ((Zftp_session)nptr->dat)->name;
+	    newsess = ((Zftp_session)newn->dat)->name;
 	}
     } else {
 	Zftp_session oldsess = zfsess;