mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-10-29 05:40:12 -04:00
treewide: Migrate from sizeof(struct) to sizeof(*pointer) where practical
This commit is contained in:
parent
a09d649439
commit
1b0694b794
99 changed files with 224 additions and 355 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue