From 3cc03d85e7c96fd1c1e05617566968a4091b6e97 Mon Sep 17 00:00:00 2001 From: Ben Harris Date: Mon, 27 Aug 2012 21:55:45 +0000 Subject: [PATCH] Make bombout() less of a macro and more of a function. This gives GCC slightly fewer opportunities to gratuitously inflate its output. [originally from svn r9634] --- ssh.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) 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. */