mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-12-15 08:56:26 -05:00
Merge pull request #533 from martinetd/wl_array_add
ENOMEM checks: consistently check wl_array_add return
This commit is contained in:
commit
bb24895a2b
7 changed files with 48 additions and 8 deletions
|
|
@ -223,7 +223,7 @@ static bool match_obj_(struct match_state *st, size_t skips, size_t score, size_
|
|||
if (score > st->score || (score == st->score && replaced < st->replaced)) {
|
||||
st->score = score;
|
||||
st->replaced = replaced;
|
||||
memcpy(st->best, st->res, sizeof st->best[0] * st->num_res);
|
||||
memcpy(st->best, st->res, sizeof(st->best[0]) * st->num_res);
|
||||
|
||||
if (st->score == st->num_objs && st->replaced == 0) {
|
||||
st->exit_early = true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue