diff options
author | Matt Johnston <matt@ucc.asn.au> | 2020-10-08 11:00:04 +0800 |
---|---|---|
committer | Matt Johnston <matt@ucc.asn.au> | 2020-10-08 11:00:04 +0800 |
commit | 306c0c09d74e5ce7c6a90043049fb780d61080fd (patch) | |
tree | 95f43234485211080995d670341920476acb1096 | |
parent | 9bb9e339e8684295289813a6bfad485658350127 (diff) | |
download | dropbear-306c0c09d74e5ce7c6a90043049fb780d61080fd.tar.gz |
Avoid gnu extension conditional operator
-rw-r--r-- | svr-chansession.c | 6 |
1 files changed, 5 insertions, 1 deletions
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 */ |