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 | 17873e8c922eded2cec86184673a6d110df6403f (patch) | |
tree | 2b1a718f633fb95c1f2d689a591cf9e8642697f3 /svr-chansession.c | |
parent | 80e928170150f2f11ce6aeaa030870608bb6323b (diff) |
Avoid gnu extension conditional operator
Diffstat (limited to 'svr-chansession.c')
-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 */ |