diff options
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; |