mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2026-03-18 05:34:29 -04: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
1 changed files with 1 additions and 1 deletions
|
|
@ -412,7 +412,7 @@ static struct wlr_drm_layer *get_or_create_layer(struct wlr_drm_backend *drm,
|
||||||
abort(); // unreachable
|
abort(); // unreachable
|
||||||
#endif
|
#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 (layer->candidate_planes == NULL) {
|
||||||
#if HAVE_LIBLIFTOFF
|
#if HAVE_LIBLIFTOFF
|
||||||
liftoff_layer_destroy(layer->liftoff);
|
liftoff_layer_destroy(layer->liftoff);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue