Slightly simplify crFinishFree{,V}.
authorben <ben@cda61777-01e9-0310-a592-d414129be87e>
Mon, 27 Aug 2012 18:44:06 +0000 (18:44 +0000)
committerben <ben@cda61777-01e9-0310-a592-d414129be87e>
Mon, 27 Aug 2012 18:44:06 +0000 (18:44 +0000)
They're only likely to be useful for freeing a coroutine state
structure, in which case there's no need to reset the line number
(since all such coroutines keep their line number in the state
structure) and the state structure pointer is always called "s".

git-svn-id: svn://svn.tartarus.org/sgt/putty@9632 cda61777-01e9-0310-a592-d414129be87e

ssh.c

diff --git a/ssh.c b/ssh.c
index b773e85..bfc10b0 100644 (file)
--- a/ssh.c
+++ b/ssh.c
@@ -439,8 +439,8 @@ enum {
 #define crState(t)     crStateP(t, ssh->t)
 #define crFinish(z)    } *crLine = 0; return (z); }
 #define crFinishV      } *crLine = 0; return; }
-#define crFinishFree(z, s)     } *crLine = 0; sfree(s); return (z); }
-#define crFinishFreeV(s)       } *crLine = 0; sfree(s); return; }
+#define crFinishFree(z)        } sfree(s); return (z); }
+#define crFinishFreeV  } sfree(s); return; }
 #define crReturn(z)    \
        do {\
            *crLine =__LINE__; return (z); case __LINE__:;\
@@ -7511,7 +7511,7 @@ static void ssh2_maybe_setup_x11(struct ssh_channel *c, struct Packet *pktin,
                logevent("X11 forwarding refused");
        }
     }
-    crFinishFreeV(s);
+    crFinishFreeV;
 }
 
 static void ssh2_maybe_setup_agent(struct ssh_channel *c, struct Packet *pktin,
@@ -7542,7 +7542,7 @@ static void ssh2_maybe_setup_agent(struct ssh_channel *c, struct Packet *pktin,
                logevent("Agent forwarding refused");
        }
     }
-    crFinishFreeV(s);
+    crFinishFreeV;
 }
 
 static void ssh2_maybe_setup_pty(struct ssh_channel *c, struct Packet *pktin,
@@ -7595,7 +7595,7 @@ static void ssh2_maybe_setup_pty(struct ssh_channel *c, struct Packet *pktin,
     } else {
        ssh->editing = ssh->echoing = 1;
     }
-    crFinishFreeV(s);
+    crFinishFreeV;
 }
 
 static void ssh2_setup_env(struct ssh_channel *c, struct Packet *pktin,
@@ -7659,7 +7659,7 @@ static void ssh2_setup_env(struct ssh_channel *c, struct Packet *pktin,
        }
     }
   out:;
-    crFinishFreeV(s);
+    crFinishFreeV;
 }
 
 /*