comparison svr-chansession.c @ 1738:4f13df974cf4

Avoid gnu extension conditional operator
author Matt Johnston <matt@ucc.asn.au>
date Thu, 08 Oct 2020 11:00:04 +0800
parents 8a7d26e86a56
children 685b47d8faf7
comparison
equal deleted inserted replaced
1737:8b27de2c92ee 1738:4f13df974cf4
691 } 691 }
692 692
693 693
694 /* take global command into account */ 694 /* take global command into account */
695 if (svr_opts.forced_command) { 695 if (svr_opts.forced_command) {
696 chansess->original_command = chansess->cmd ? : m_strdup(""); 696 if (chansess->cmd) {
697 chansess->original_command = chansess->cmd;
698 } else {
699 chansess->original_command = m_strdup("");
700 }
697 chansess->cmd = m_strdup(svr_opts.forced_command); 701 chansess->cmd = m_strdup(svr_opts.forced_command);
698 } else { 702 } else {
699 /* take public key option 'command' into account */ 703 /* take public key option 'command' into account */
700 svr_pubkey_set_forced_command(chansess); 704 svr_pubkey_set_forced_command(chansess);
701 } 705 }