[babl] babl-space: 0 initialize temporary stack allocated BablSpace instances
- From: Øyvind "pippin" Kolås <ok src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [babl] babl-space: 0 initialize temporary stack allocated BablSpace instances
- Date: Sat, 20 Jul 2019 13:45:33 +0000 (UTC)
commit 850582f7a6cf02376a9c8bf4eb2734f615e537ea
Author: Øyvind Kolås <pippin gimp org>
Date: Sat Jul 20 15:34:15 2019 +0200
babl-space: 0 initialize temporary stack allocated BablSpace instances
After the CMYK support was added, we ended up sometimes having the is_cmyk
flag set on RGB matrix profiles, leading to forced reference conversions.
babl/babl-space.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
---
diff --git a/babl/babl-space.c b/babl/babl-space.c
index 10eb045..9b71614 100644
--- a/babl/babl-space.c
+++ b/babl/babl-space.c
@@ -227,7 +227,7 @@ _babl_space_for_lcms (const char *icc_data,
int icc_length)
{
int i=0;
- BablSpace space;
+ BablSpace space = {0,};
for (i = 0; space_db[i].instance.class_type; i++)
@@ -278,10 +278,9 @@ babl_space_from_rgbxyz_matrix (const char *name,
const Babl *trc_blue)
{
int i=0;
- BablSpace space;
+ BablSpace space = {0,};
space.instance.class_type = BABL_SPACE;
space.instance.id = 0;
-
/* transplant matrixes */
space.RGBtoXYZ[0] = rx;
@@ -374,7 +373,7 @@ babl_space_from_chromaticities (const char *name,
BablSpaceFlags flags)
{
int i=0;
- static BablSpace space;
+ BablSpace space = {0,};
space.instance.class_type = BABL_SPACE;
space.instance.id = 0;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]