Skip to content

Commit

Permalink
bevent: omit empty initializer values
Browse files Browse the repository at this point in the history
  • Loading branch information
cspiel1 committed Aug 8, 2024
1 parent 7e2f3e7 commit d7352bf
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/bevent.c
Original file line number Diff line number Diff line change
Expand Up @@ -724,8 +724,7 @@ void ua_event(struct ua *ua, enum ua_event ev, struct call *call,
warning("Used deprecated ua_event() for %s. "
"Use one of event_xxx_emit() instead!\n",
uag_event_str(ev));
struct bevent event = {.ev = ev, .txt = buf, .err = 0, .stop = false,
.u = { 0 } };
struct bevent event = {.ev = ev, .txt = buf};

if (bevent_class(ev) == BEVENT_CLASS_CALL)
event.u.call = call;
Expand Down Expand Up @@ -781,9 +780,7 @@ void module_event(const char *module, const char *event, struct ua *ua,
eh->h(ua, UA_EVENT_MODULE, call, buf, eh->arg);
}

struct bevent bevent = {.ev = UA_EVENT_MODULE,
.txt = buf, .err = 0, .stop = false,
.u = { 0 } };
struct bevent bevent = {.ev = UA_EVENT_MODULE, .txt = buf};

if (call)
bevent.u.call = call;
Expand Down

0 comments on commit d7352bf

Please sign in to comment.