use sizeof(*pointer) instead of sizeof(struct)
This commit is contained in:
parent
922e117fc5
commit
1f10e69b4c
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);
|
||||||
|
Loading…
Reference in New Issue
Block a user