From cba9a65ed4157417b84f2d3e9b912f315a45c584 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Sun, 1 Jun 2014 02:00:16 +0200 Subject: m + doc MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- src/lib/libgamma-method.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/lib/libgamma-method.c') diff --git a/src/lib/libgamma-method.c b/src/lib/libgamma-method.c index 4c81549..f9fa7a3 100644 --- a/src/lib/libgamma-method.c +++ b/src/lib/libgamma-method.c @@ -40,7 +40,7 @@ int libgamma_gamma_ramps_initialise(libgamma_gamma_ramps_t* restrict this) this->red = malloc(n * sizeof(uint16_t)); this->green = this-> red + this-> red_size; this->blue = this->green + this->green_size; - return this->red ? 0 : -1; + return this->red == NULL ? -1 : 0; } @@ -89,7 +89,7 @@ int libgamma_gamma_ramps32_initialise(libgamma_gamma_ramps32_t* restrict this) this->red = malloc(n * sizeof(uint32_t)); this->green = this-> red + this-> red_size; this->blue = this->green + this->green_size; - return this->red ? 0 : -1; + return this->red == NULL ? -1 : 0; } @@ -138,7 +138,7 @@ int libgamma_gamma_ramps64_initialise(libgamma_gamma_ramps64_t* restrict this) this->red = malloc(n * sizeof(uint64_t)); this->green = this-> red + this-> red_size; this->blue = this->green + this->green_size; - return this->red ? 0 : -1; + return this->red == NULL ? -1 : 0; } @@ -187,7 +187,7 @@ int libgamma_gamma_rampsf_initialise(libgamma_gamma_rampsf_t* restrict this) this->red = malloc(n * sizeof(float)); this->green = this-> red + this-> red_size; this->blue = this->green + this->green_size; - return this->red ? 0 : -1; + return this->red == NULL ? -1 : 0; } -- cgit v1.2.3-70-g09d2