Commit 8a048037 authored by Petri Latvala's avatar Petri Latvala

tests: Use correct type for calloc

No actual difference, size of a pointer is the same as
pointer-to-pointer.
Signed-off-by: Petri Latvala's avatarPetri Latvala <petri.latvala@intel.com>
Cc: Mika Kahola <mika.kahola@intel.com>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>
Reviewed-by: 's avatarMika Kahola <mika.kahola@intel.com>
parent c519474d
......@@ -61,7 +61,7 @@ static void test_init(data_t *data, enum pipe pipe, int n_planes,
igt_plane_t *primary;
int ret;
data->plane = calloc(n_planes, sizeof(data->plane));
data->plane = calloc(n_planes, sizeof(*data->plane));
igt_assert_f(data->plane != NULL, "Failed to allocate memory for planes\n");
data->fb = calloc(n_planes, sizeof(struct igt_fb));
......
......@@ -69,7 +69,7 @@ static void test_init(data_t *data, enum pipe pipe, int n_planes)
{
data->pipe_crc = igt_pipe_crc_new(data->drm_fd, pipe, INTEL_PIPE_CRC_SOURCE_AUTO);
data->plane = calloc(n_planes, sizeof(data->plane));
data->plane = calloc(n_planes, sizeof(*data->plane));
igt_assert_f(data->plane != NULL, "Failed to allocate memory for planes\n");
data->fb = calloc(n_planes, sizeof(struct igt_fb));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment