aboutsummaryrefslogtreecommitdiff
path: root/tinywl/tinywl.c
diff options
context:
space:
mode:
authorAlexander Orzechowski <alex@ozal.ski>2023-10-03 01:51:07 -0400
committerAlexander Orzechowski <alex@ozal.ski>2023-10-03 01:51:07 -0400
commit1b0694b79481643cb456d03e1be50a1b4f6ca591 (patch)
treec693c5de3ee7ebd52873f6ec063118408f0bd28a /tinywl/tinywl.c
parenta09d6494397bdd28a3254d2e646212afb5a3049c (diff)
treewide: Migrate from sizeof(struct) to sizeof(*pointer) where practical
Diffstat (limited to 'tinywl/tinywl.c')
-rw-r--r--tinywl/tinywl.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/tinywl/tinywl.c b/tinywl/tinywl.c
index 67d2be77..7d1a3806 100644
--- a/tinywl/tinywl.c
+++ b/tinywl/tinywl.c
@@ -243,8 +243,7 @@ static void server_new_keyboard(struct tinywl_server *server,
struct wlr_input_device *device) {
struct wlr_keyboard *wlr_keyboard = wlr_keyboard_from_input_device(device);
- struct tinywl_keyboard *keyboard =
- calloc(1, sizeof(struct tinywl_keyboard));
+ struct tinywl_keyboard *keyboard = calloc(1, sizeof(*keyboard));
keyboard->server = server;
keyboard->wlr_keyboard = wlr_keyboard;
@@ -619,8 +618,7 @@ static void server_new_output(struct wl_listener *listener, void *data) {
wlr_output_state_finish(&state);
/* Allocates and configures our state for this output */
- struct tinywl_output *output =
- calloc(1, sizeof(struct tinywl_output));
+ struct tinywl_output *output = calloc(1, sizeof(*output));
output->wlr_output = wlr_output;
output->server = server;
@@ -794,8 +792,7 @@ static void server_new_xdg_surface(struct wl_listener *listener, void *data) {
assert(xdg_surface->role == WLR_XDG_SURFACE_ROLE_TOPLEVEL);
/* Allocate a tinywl_view for this surface */
- struct tinywl_view *view =
- calloc(1, sizeof(struct tinywl_view));
+ struct tinywl_view *view = calloc(1, sizeof(*view));
view->server = server;
view->xdg_toplevel = xdg_surface->toplevel;
view->scene_tree = wlr_scene_xdg_surface_create(