1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-01-10 01:48:00 +00:00

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]
This commit is contained in:
Ben Harris 2012-08-27 21:55:45 +00:00
parent df83634e21
commit 3cc03d85e7

17
ssh.c
View File

@ -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. */