diff options
author | Alexander Orzechowski <alex@ozal.ski> | 2023-05-04 14:16:55 -0400 |
---|---|---|
committer | Simon Ser <contact@emersion.fr> | 2023-05-04 18:19:33 +0000 |
commit | 5adb1be3a71fb5534b12ca6009d7113cb59f0134 (patch) | |
tree | 1e7a14709afe168bc03a30d218ff07bd3a1b85fc /render | |
parent | 1ee75786b40e3cf51428fe1a4fb67e09be163537 (diff) |
drm_format_set_intersect: Require initialized dst and remove assert
The usages in linux_dmabuf zero out the dst before passing it so this
change should be fine.
Diffstat (limited to 'render')
-rw-r--r-- | render/drm_format_set.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/render/drm_format_set.c b/render/drm_format_set.c index 464c0fb4..8f3aea99 100644 --- a/render/drm_format_set.c +++ b/render/drm_format_set.c @@ -205,8 +205,6 @@ struct wlr_drm_format *wlr_drm_format_intersect( bool wlr_drm_format_set_intersect(struct wlr_drm_format_set *dst, const struct wlr_drm_format_set *a, const struct wlr_drm_format_set *b) { - assert(dst != a && dst != b); - struct wlr_drm_format_set out = {0}; out.capacity = a->len < b->len ? a->len : b->len; out.formats = calloc(out.capacity, sizeof(struct wlr_drm_format *)); @@ -237,6 +235,7 @@ bool wlr_drm_format_set_intersect(struct wlr_drm_format_set *dst, return false; } + wlr_drm_format_set_finish(dst); *dst = out; return true; } |