diff options
author | Michael Smith <mikesmiffy128@gmail.com> | 2022-05-16 21:07:41 +0100 |
---|---|---|
committer | Michael Smith <mikesmiffy128@gmail.com> | 2022-05-16 22:15:46 +0100 |
commit | 278b61bc3f2018515e26fd6b45410aded8b6417e (patch) | |
tree | 39a860b66c3d88e91359f48dbf937c0c71d61833 /src/con_.c | |
parent | e8843dba3eb1c7a67f6ff7b920046ae36a12acd0 (diff) |
Clean up some random bits and bobs
Diffstat (limited to 'src/con_.c')
-rw-r--r-- | src/con_.c | 6 |
1 files changed, 2 insertions, 4 deletions
@@ -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 |