From c1bd628ce524f52851cf2bbcb4bc8bbc373dcd6b Mon Sep 17 00:00:00 2001 From: Kevin O'Connor Date: Tue, 20 Jun 2017 12:09:55 -0400 Subject: command: Directly call command_sendf() for ack/nak messages Don't use the sendf() macro for ack and nak messages - directly call the command_sendf() code instead. Signed-off-by: Kevin O'Connor --- scripts/buildcommands.py | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) (limited to 'scripts') diff --git a/scripts/buildcommands.py b/scripts/buildcommands.py index a26801ee..0c147191 100644 --- a/scripts/buildcommands.py +++ b/scripts/buildcommands.py @@ -29,9 +29,6 @@ def error(msg): ###################################################################### def build_parser(parser, iscmd, all_param_types): - if parser.name == "#empty": - return "\n // Empty message\n .max_size=%d," % ( - msgproto.MESSAGE_MIN,) if parser.name == "#output": comment = "Output: " + parser.msgformat else: @@ -71,8 +68,6 @@ def build_encoders(encoders, msg_to_id, all_param_types): if msgid in did_output: continue s = msg - if s == '#empty': - s = '' did_output[msgid] = True code = (' if (__builtin_strcmp(str, "%s") == 0)\n' ' return &command_encoder_%s;\n' % (s, msgid)) @@ -308,10 +303,7 @@ def main(): error("Conflicting definition for command '%s'" % msgname) messages_by_name[msgname] = msg elif cmd == '_DECL_ENCODER': - if len(parts) == 1: - msgname = msg = "#empty" - else: - msgname = parts[1] + msgname = parts[1] m = messages_by_name.get(msgname) if m is not None and m != msg: error("Conflicting definition for message '%s'" % msgname) -- cgit v1.2.3-70-g09d2