X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=bertos%2Fmware%2Fparser.c;h=71aec30dc980f58d1c4b1ada8060224c96878e7c;hb=332a7970140d2af1b233d29c0316f51a6a54a637;hp=142feba68c8a895b4c8932ccbc1c109707ac5c26;hpb=26e8db4f8e6ce50cf4fa9fd8f665eea8d8c9ea70;p=bertos.git diff --git a/bertos/mware/parser.c b/bertos/mware/parser.c index 142feba6..71aec30d 100644 --- a/bertos/mware/parser.c +++ b/bertos/mware/parser.c @@ -309,10 +309,11 @@ bool parser_process_line(const char* input) * Register a new command into the parser * * \param cmd Command template describing the command + * \return true if registration was successful, false otherwise */ -void parser_register_cmd(const struct CmdTemplate* cmd) +bool parser_register_cmd(const struct CmdTemplate* cmd) { - ht_insert(&commands, cmd); + return ht_insert(&commands, cmd); } void parser_init(void)