From 1f10e69b4ccaf5ba335b4584db3c42190b45ffe6 Mon Sep 17 00:00:00 2001 From: Leonardo Hernández Hernández Date: Sat, 25 Nov 2023 12:40:13 -0600 Subject: use sizeof(*pointer) instead of sizeof(struct) --- dwl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dwl.c b/dwl.c index 5725bf1..c0c5c08 100644 --- a/dwl.c +++ b/dwl.c @@ -815,7 +815,7 @@ createlayersurface(struct wl_listener *listener, void *data) return; } - layersurface = wlr_layer_surface->data = ecalloc(1, sizeof(LayerSurface)); + layersurface = wlr_layer_surface->data = ecalloc(1, sizeof(*layersurface)); layersurface->type = LayerShell; LISTEN(&wlr_layer_surface->surface->events.commit, &layersurface->surface_commit, commitlayersurfacenotify); -- cgit v1.2.3