From 0d201bfb8495ca95cac852a499a0097495b58a6c Mon Sep 17 00:00:00 2001 From: ben Date: Mon, 27 Aug 2012 18:44:06 +0000 Subject: [PATCH] Slightly simplify crFinishFree{,V}. 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 | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/ssh.c b/ssh.c index b773e851..bfc10b02 100644 --- 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; } /* -- 2.11.0