summaryrefslogtreecommitdiffhomepage
path: root/src/con_.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/con_.c')
-rw-r--r--src/con_.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/con_.c b/src/con_.c
index 27c7745..5cfe046 100644
--- a/src/con_.c
+++ b/src/con_.c
@@ -497,13 +497,11 @@ SETTER(int, 2, con_setvari)
#undef SETTER
con_cmdcb con_getcmdcb(const struct con_cmd *cmd) {
- if (cmd->use_newcmdiface || !cmd->use_newcb) return 0;
- return cmd->cb;
+ return !cmd->use_newcmdiface && cmd->use_newcb ? cmd->cb : 0;
}
con_cmdcbv1 con_getcmdcbv1(const struct con_cmd *cmd) {
- if (cmd->use_newcmdiface || cmd->use_newcb) return 0;
- return cmd->cb_v1;
+ return !cmd->use_newcmdiface && !cmd->use_newcb ? cmd->cb_v1 : 0;
}
// vi: sw=4 ts=4 noet tw=80 cc=80