# HG changeset patch # User Matt Johnston # Date 1602126004 -28800 # Node ID 4f13df974cf42e9bdcd311cd080a0355b340363d # Parent 8b27de2c92eedafc00c80948d3c9e063cb60f363 Avoid gnu extension conditional operator diff -r 8b27de2c92ee -r 4f13df974cf4 svr-chansession.c --- a/svr-chansession.c Tue Jul 28 18:53:48 2020 +0800 +++ b/svr-chansession.c Thu Oct 08 11:00:04 2020 +0800 @@ -693,7 +693,11 @@ /* take global command into account */ if (svr_opts.forced_command) { - chansess->original_command = chansess->cmd ? : m_strdup(""); + if (chansess->cmd) { + chansess->original_command = chansess->cmd; + } else { + chansess->original_command = m_strdup(""); + } chansess->cmd = m_strdup(svr_opts.forced_command); } else { /* take public key option 'command' into account */