aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--backend/drm/util.c2
-rw-r--r--examples/screenshot.c2
-rw-r--r--types/wlr_data_device.c4
3 files changed, 4 insertions, 4 deletions
diff --git a/backend/drm/util.c b/backend/drm/util.c
index 25256343..37d99aa8 100644
--- a/backend/drm/util.c
+++ b/backend/drm/util.c
@@ -223,7 +223,7 @@ static bool match_obj_(struct match_state *st, size_t skips, size_t score, size_
if (score > st->score || (score == st->score && replaced < st->replaced)) {
st->score = score;
st->replaced = replaced;
- memcpy(st->best, st->res, sizeof st->best[0] * st->num_res);
+ memcpy(st->best, st->res, sizeof(st->best[0]) * st->num_res);
if (st->score == st->num_objs && st->replaced == 0) {
st->exit_early = true;
diff --git a/examples/screenshot.c b/examples/screenshot.c
index a887d1d7..66e5c75c 100644
--- a/examples/screenshot.c
+++ b/examples/screenshot.c
@@ -95,7 +95,7 @@ static void handle_global(void *data, struct wl_registry *registry,
static struct screenshooter_output *output;
if (strcmp(interface, "wl_output") == 0) {
- output = calloc(1, sizeof *output);
+ output = calloc(1, sizeof(*output));
output->output = wl_registry_bind(registry, name, &wl_output_interface,
1);
wl_list_insert(&output_list, &output->link);
diff --git a/types/wlr_data_device.c b/types/wlr_data_device.c
index 58893129..a9f54a0b 100644
--- a/types/wlr_data_device.c
+++ b/types/wlr_data_device.c
@@ -901,14 +901,14 @@ static void data_source_offer(struct wl_client *client,
wl_resource_get_user_data(resource);
char **p;
- p = wl_array_add(&source->mime_types, sizeof *p);
+ p = wl_array_add(&source->mime_types, sizeof(*p));
if (p) {
*p = strdup(mime_type);
}
if (!p || !*p){
if (p) {
- source->mime_types.size -= sizeof *p;
+ source->mime_types.size -= sizeof(*p);
}
wl_resource_post_no_memory(resource);
}