diff --git a/src/kernel/messages.c b/src/kernel/messages.c index d3cd4f99b..b8d33f08c 100644 --- a/src/kernel/messages.c +++ b/src/kernel/messages.c @@ -258,15 +258,14 @@ message * msg_error(const unit * u, struct order *ord, int mno) { return msg_feedback(u, ord, msgname, ""); } -message * cmistake(const unit * u, struct order *ord, int mno, int mtype) +void cmistake(const unit * u, struct order *ord, int mno, int mtype) { - message * result; + message * msg; UNUSED_ARG(mtype); - result = msg_error(u, ord, mno); - if (result) { - ADDMSG(&u->faction->msgs, result); + msg = msg_error(u, ord, mno); + if (msg) { + ADDMSG(&u->faction->msgs, msg); } - return result; } void syntax_error(const struct unit *u, struct order *ord) diff --git a/src/kernel/messages.h b/src/kernel/messages.h index a42342153..4eca65fc1 100644 --- a/src/kernel/messages.h +++ b/src/kernel/messages.h @@ -60,7 +60,7 @@ extern "C" { #define ADDMSG(msgs, mcreate) { message * mx = mcreate; if (mx) { assert(mx->refcount>=1); add_message(msgs, mx); msg_release(mx); } } void syntax_error(const struct unit *u, struct order *ord); - struct message * cmistake(const struct unit *u, struct order *ord, int mno, int mtype); + void cmistake(const struct unit *u, struct order *ord, int mno, int mtype); struct message * msg_error(const struct unit * u, struct order *ord, int mno); #ifdef __cplusplus }