diff options
author | Alexander Orzechowski <alex@ozal.ski> | 2023-10-03 01:51:07 -0400 |
---|---|---|
committer | Alexander Orzechowski <alex@ozal.ski> | 2023-10-03 01:51:07 -0400 |
commit | 1b0694b79481643cb456d03e1be50a1b4f6ca591 (patch) | |
tree | c693c5de3ee7ebd52873f6ec063118408f0bd28a /render/gles2 | |
parent | a09d6494397bdd28a3254d2e646212afb5a3049c (diff) |
treewide: Migrate from sizeof(struct) to sizeof(*pointer) where practical
Diffstat (limited to 'render/gles2')
-rw-r--r-- | render/gles2/renderer.c | 5 | ||||
-rw-r--r-- | render/gles2/texture.c | 3 |
2 files changed, 3 insertions, 5 deletions
diff --git a/render/gles2/renderer.c b/render/gles2/renderer.c index 9fe934f7..4899cfc7 100644 --- a/render/gles2/renderer.c +++ b/render/gles2/renderer.c @@ -583,7 +583,7 @@ static struct wlr_render_timer *gles2_render_timer_create(struct wlr_renderer *w return NULL; } - struct wlr_gles2_render_timer *timer = calloc(1, sizeof(struct wlr_gles2_render_timer)); + struct wlr_gles2_render_timer *timer = calloc(1, sizeof(*timer)); if (!timer) { return NULL; } @@ -826,8 +826,7 @@ struct wlr_renderer *wlr_gles2_renderer_create(struct wlr_egl *egl) { return NULL; } - struct wlr_gles2_renderer *renderer = - calloc(1, sizeof(struct wlr_gles2_renderer)); + struct wlr_gles2_renderer *renderer = calloc(1, sizeof(*renderer)); if (renderer == NULL) { return NULL; } diff --git a/render/gles2/texture.c b/render/gles2/texture.c index 6cfd103d..b444745c 100644 --- a/render/gles2/texture.c +++ b/render/gles2/texture.c @@ -174,8 +174,7 @@ static const struct wlr_texture_impl texture_impl = { static struct wlr_gles2_texture *gles2_texture_create( struct wlr_gles2_renderer *renderer, uint32_t width, uint32_t height) { - struct wlr_gles2_texture *texture = - calloc(1, sizeof(struct wlr_gles2_texture)); + struct wlr_gles2_texture *texture = calloc(1, sizeof(*texture)); if (texture == NULL) { wlr_log_errno(WLR_ERROR, "Allocation failed"); return NULL; |