diff options
author | Petri Latvala <petri.latvala@intel.com> | 2019-01-16 13:20:33 +0200 |
---|---|---|
committer | Petri Latvala <petri.latvala@intel.com> | 2019-01-21 13:49:11 +0200 |
commit | c519474d19f664668f987fbf7a834ca58986c2af (patch) | |
tree | fd52191ffd52479db83243414cc43ed51668daab /lib/igt_kms.c | |
parent | 7545a421916534d2f6a4c14f7e00622335c9c3f6 (diff) | |
download | platform_external_igt-gpu-tools-c519474d19f664668f987fbf7a834ca58986c2af.tar.gz platform_external_igt-gpu-tools-c519474d19f664668f987fbf7a834ca58986c2af.tar.bz2 platform_external_igt-gpu-tools-c519474d19f664668f987fbf7a834ca58986c2af.zip |
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 <petri.latvala@intel.com>
Cc: Abdiel Janulgue <abdiel.janulgue@linux.intel.com>
Reviewed-by: Abdiel Janulgue <abdiel.janulgue@linux.intel.com>
Diffstat (limited to 'lib/igt_kms.c')
-rw-r--r-- | lib/igt_kms.c | 2 |
1 files changed, 1 insertions, 1 deletions
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; |