summaryrefslogtreecommitdiff
path: root/src/lib/ector/software
diff options
context:
space:
mode:
authorMarcel Hollerbach <mail@marcel-hollerbach.de>2020-03-23 11:20:56 +0100
committerMarcel Hollerbach <mail@marcel-hollerbach.de>2020-03-23 11:22:09 +0100
commit6934a9623e0036bfd0d6f5e8d2f9f8553c8d4b56 (patch)
tree1a21094910a11c2a133b586ea885899d78ba74e1 /src/lib/ector/software
parentefb15f510c70acde922d59708494539aa686c408 (diff)
ector: fix pointer checking
we want to check if the pointer is available, and not the value of the pointer. This fixes some "Jump depends on uninitialized value" messages from valgrind.
Diffstat (limited to 'src/lib/ector/software')
-rw-r--r--src/lib/ector/software/ector_software_buffer.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lib/ector/software/ector_software_buffer.c b/src/lib/ector/software/ector_software_buffer.c
index 62dae2c50b..efaf5fefca 100644
--- a/src/lib/ector/software/ector_software_buffer.c
+++ b/src/lib/ector/software/ector_software_buffer.c
@@ -67,10 +67,10 @@ EOLIAN static Eina_Bool
67_ector_software_buffer_base_ector_buffer_pixels_get(Eo *obj EINA_UNUSED, Ector_Software_Buffer_Base_Data *pd, 67_ector_software_buffer_base_ector_buffer_pixels_get(Eo *obj EINA_UNUSED, Ector_Software_Buffer_Base_Data *pd,
68 void **pixels, int* width, int* height, int* stride) 68 void **pixels, int* width, int* height, int* stride)
69{ 69{
70 if (*pixels) *pixels = pd->pixels.u8; 70 if (pixels) *pixels = pd->pixels.u8;
71 if (*width) *width = pd->generic->w; 71 if (width) *width = pd->generic->w;
72 if (*height) *height = pd->generic->h; 72 if (height) *height = pd->generic->h;
73 if (*stride) *stride = pd->stride; 73 if (stride) *stride = pd->stride;
74 return pd->writable; 74 return pd->writable;
75} 75}
76 76