use sizeof(*pointer) instead of sizeof(struct)
This commit is contained in:
2
dwl.c
2
dwl.c
@@ -815,7 +815,7 @@ createlayersurface(struct wl_listener *listener, void *data)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
layersurface = wlr_layer_surface->data = ecalloc(1, sizeof(LayerSurface));
|
layersurface = wlr_layer_surface->data = ecalloc(1, sizeof(*layersurface));
|
||||||
layersurface->type = LayerShell;
|
layersurface->type = LayerShell;
|
||||||
LISTEN(&wlr_layer_surface->surface->events.commit,
|
LISTEN(&wlr_layer_surface->surface->events.commit,
|
||||||
&layersurface->surface_commit, commitlayersurfacenotify);
|
&layersurface->surface_commit, commitlayersurfacenotify);
|
||||||
|
Reference in New Issue
Block a user