render/color: use variable instead of type in sizeof()

Conforms to the wlroots code style.
This commit is contained in:
Simon Ser 2025-05-24 11:10:22 +02:00 committed by Kenny Levinsen
parent d421538b4a
commit 9b97e2607d
2 changed files with 2 additions and 2 deletions

View file

@ -30,7 +30,7 @@ void wlr_color_transform_init(struct wlr_color_transform *tr, enum wlr_color_tra
} }
struct wlr_color_transform *wlr_color_transform_init_srgb(void) { struct wlr_color_transform *wlr_color_transform_init_srgb(void) {
struct wlr_color_transform *tx = calloc(1, sizeof(struct wlr_color_transform)); struct wlr_color_transform *tx = calloc(1, sizeof(*tx));
if (!tx) { if (!tx) {
return NULL; return NULL;
} }

View file

@ -95,7 +95,7 @@ struct wlr_color_transform *wlr_color_transform_init_linear_to_icc(
} }
} }
tx = calloc(1, sizeof(struct wlr_color_transform_lut3d)); tx = calloc(1, sizeof(*tx));
if (!tx) { if (!tx) {
goto out_lcms_tr; goto out_lcms_tr;
} }