use sizeof(*pointer) instead of sizeof(struct)
This commit is contained in:
parent
922e117fc5
commit
1f10e69b4c
1 changed files with 1 additions and 1 deletions
2
dwl.c
2
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);
|
||||
|
|
Loading…
Reference in a new issue