From 17873e8c922eded2cec86184673a6d110df6403f Mon Sep 17 00:00:00 2001 From: Matt Johnston Date: Thu, 8 Oct 2020 11:00:04 +0800 Subject: [PATCH] Avoid gnu extension conditional operator --- svr-chansession.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/svr-chansession.c b/svr-chansession.c index fff9dbc..d090395 100644 --- a/svr-chansession.c +++ b/svr-chansession.c @@ -693,7 +693,11 @@ static int sessioncommand(struct Channel *channel, struct ChanSess *chansess, /* 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 */