mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2024-11-21 22:52:20 +00:00
backend/drm: fix swapped calloc() arguments in get_or_create_layer()
../backend/drm/drm.c:415:49: error: ‘calloc’ sizes specified with ‘sizeof’ in the earlier argument and not in the later argument [-Werror=calloc-transposed-args] 415 | layer->candidate_planes = calloc(sizeof(bool), drm->num_planes); | ^~~~
This commit is contained in:
parent
29cb151987
commit
315e022f2f
@ -412,7 +412,7 @@ static struct wlr_drm_layer *get_or_create_layer(struct wlr_drm_backend *drm,
|
||||
abort(); // unreachable
|
||||
#endif
|
||||
|
||||
layer->candidate_planes = calloc(sizeof(bool), drm->num_planes);
|
||||
layer->candidate_planes = calloc(drm->num_planes, sizeof(layer->candidate_planes[0]));
|
||||
if (layer->candidate_planes == NULL) {
|
||||
#if HAVE_LIBLIFTOFF
|
||||
liftoff_layer_destroy(layer->liftoff);
|
||||
|
Loading…
Reference in New Issue
Block a user