From: ben Date: Mon, 27 Aug 2012 21:55:45 +0000 (+0000) Subject: Make bombout() less of a macro and more of a function. X-Git-Url: https://git.distorted.org.uk/~mdw/sgt/putty/commitdiff_plain/3976feca5001403b8160e6f946360a33adefb077 Make bombout() less of a macro and more of a function. This gives GCC slightly fewer opportunities to gratuitously inflate its output. git-svn-id: svn://svn.tartarus.org/sgt/putty@9634 cda61777-01e9-0310-a592-d414129be87e --- diff --git a/ssh.c b/ssh.c index bdab733f..99410795 100644 --- a/ssh.c +++ b/ssh.c @@ -1019,14 +1019,15 @@ static void logeventf(Ssh ssh, const char *fmt, ...) sfree(buf); } -#define bombout(msg) \ - do { \ - char *text = dupprintf msg; \ - ssh_do_close(ssh, FALSE); \ - logevent(text); \ - connection_fatal(ssh->frontend, "%s", text); \ - sfree(text); \ - } while (0) +static void bomb_out(Ssh ssh, char *text) +{ + ssh_do_close(ssh, FALSE); + logevent(text); + connection_fatal(ssh->frontend, "%s", text); + sfree(text); +} + +#define bombout(msg) bomb_out(ssh, dupprintf msg) /* Functions to leave bits out of the SSH packet log file. */