From c519474d19f664668f987fbf7a834ca58986c2af Mon Sep 17 00:00:00 2001 From: Petri Latvala Date: Wed, 16 Jan 2019 13:20:33 +0200 Subject: lib/igt_kms: Use correct type for calloc The type mismatch was char vs. unsigned char, both being size 1 so this didn't cause any actual issues other than noise in static analysis that doesn't believe 1 is equal to another type of 1. Signed-off-by: Petri Latvala Cc: Abdiel Janulgue Reviewed-by: Abdiel Janulgue --- lib/igt_kms.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/igt_kms.c') diff --git a/lib/igt_kms.c b/lib/igt_kms.c index 684a599c..f926eafb 100644 --- a/lib/igt_kms.c +++ b/lib/igt_kms.c @@ -1234,7 +1234,7 @@ init_cea_block(const unsigned char *edid, size_t length, *new_length = length + 128; - new_edid.data = calloc(*new_length, sizeof(char)); + new_edid.data = calloc(*new_length, sizeof(*new_edid.data)); igt_assert_f(new_edid.data, "Failed to allocate %zu bytes for edid\n", sizeof(new_length)); memcpy(new_edid.data, edid, length); *new_edid_ptr = new_edid.data; -- cgit v1.2.3