summaryrefslogtreecommitdiffhomepage
path: root/src/con_.c
diff options
context:
space:
mode:
authorMichael Smith <mikesmiffy128@gmail.com>2022-05-16 21:07:41 +0100
committerMichael Smith <mikesmiffy128@gmail.com>2022-05-16 22:15:46 +0100
commit278b61bc3f2018515e26fd6b45410aded8b6417e (patch)
tree39a860b66c3d88e91359f48dbf937c0c71d61833 /src/con_.c
parente8843dba3eb1c7a67f6ff7b920046ae36a12acd0 (diff)
Clean up some random bits and bobs
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