mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
Use early return for rejecting_deadly in signal_cb
This commit is contained in:
parent
74f54d78d9
commit
a02bcc0d2f
@ -152,14 +152,15 @@ static void signal_cb(uv_signal_t *handle, int signum)
|
||||
|
||||
if (rejecting_deadly) {
|
||||
if (signum == SIGINT) {
|
||||
got_int = TRUE;
|
||||
got_int = true;
|
||||
}
|
||||
} else {
|
||||
event = (Event *)xmalloc(sizeof(Event));
|
||||
event->type = kEventSignal;
|
||||
event->data = xmalloc(sizeof(int));
|
||||
*(int *)event->data = signum;
|
||||
event_push(event);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
event = (Event *)xmalloc(sizeof(Event));
|
||||
event->type = kEventSignal;
|
||||
event->data = xmalloc(sizeof(int));
|
||||
*(int *)event->data = signum;
|
||||
event_push(event);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user