]> granicus.if.org Git - libevent/commitdiff
Fix improper string concatenations in lists
authorEnji Cooper <yaneurabeya@gmail.com>
Sat, 28 Mar 2020 00:01:53 +0000 (17:01 -0700)
committerEnji Cooper <yaneurabeya@gmail.com>
Sat, 28 Mar 2020 00:30:02 +0000 (17:30 -0700)
This change adds commas between elements or explicitly concatenates the
strings, so the values are no longer concatenated by accident.

Signed-off-by: Enji Cooper <yaneurabeya@gmail.com>
event_rpcgen.py

index dbf2364956676b4ff572f3c5e6359ab644a6d95f..590b4eb4929691f91ac404d9b5dbcf6685649274 100755 (executable)
@@ -912,7 +912,8 @@ class EntryStruct(Entry):
             "  had_error = 1;",
             "  goto done;",
             "}",
-            "done:" "if (tmp != NULL)",
+            "done:",
+            "if (tmp != NULL)",
             "  evbuffer_free(tmp);",
             "if (had_error) {",
             "  %(refname)s_clear(%(var)s);",
@@ -999,7 +1000,8 @@ class EntryStruct(Entry):
             "%(var)s = %(refname)s_new();",
             "if (%(var)s == NULL)",
             "  return (-1);",
-            "if (evtag_unmarshal_%(refname)s(%(buf)s, %(tag)s, " "%(var)s) == -1) {",
+            "if (evtag_unmarshal_%(refname)s(%(buf)s, %(tag)s, ",
+            "    %(var)s) == -1) {",
             '  event_warnx("%%s: failed to unmarshal %(name)s", __func__);',
             "  return (-1);",
             "}",
@@ -1284,10 +1286,11 @@ class EntryArray(Entry):
             "    return -1;",
             "  msg->%(name)s_data = new_data;",
             "  msg->%(name)s_num_allocated = tobe_allocated;",
-            "  return 0;" "}",
+            "  return 0;",
+            "}",
             "",
             "%(ctype)s %(optpointer)s",
-            "%(parent_name)s_%(name)s_add(" "struct %(parent_name)s *msg%(optaddarg)s)",
+            "%(parent_name)s_%(name)s_add(struct %(parent_name)s *msg%(optaddarg)s)",
             "{",
             "  if (++msg->%(name)s_length >= msg->%(name)s_num_allocated) {",
             "    if (%(parent_name)s_%(name)s_expand_to_hold_more(msg)<0)",