[cogl/cogl-1.14] meta-texture: Fix nonsensical <= on pointers



commit 9fb0cbd45db40b34669fc7397b69c731019b70ac
Author: Adam Jackson <ajax redhat com>
Date:   Fri Dec 7 09:43:49 2012 -0500

    meta-texture: Fix nonsensical <= on pointers
    
    Comparing the pointed-to value is clearly what was meant.
    
    Found by Coverity.
    
    Signed-off-by: Adam Jackson <ajax redhat com>
    Reviewed-by: Robert Bragg <robert linux intel com>
    
    (cherry picked from commit f676352210fad856ae85962733e488bc1a832411)

 cogl/cogl-meta-texture.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/cogl/cogl-meta-texture.c b/cogl/cogl-meta-texture.c
index 4f51f7c..0770db2 100644
--- a/cogl/cogl-meta-texture.c
+++ b/cogl/cogl-meta-texture.c
@@ -337,7 +337,7 @@ foreach_clamped_region (CoglMetaTexture *meta_texture,
                                                clamp_s_cb,
                                                &clamp_data);
           /* Have we handled everything? */
-          if (tx_2 <= 0)
+          if (*tx_2 <= 0)
             return TRUE;
 
           /* clamp tx_1 since we've handled everything with x < 0 */
@@ -396,7 +396,7 @@ foreach_clamped_region (CoglMetaTexture *meta_texture,
                                                clamp_t_cb,
                                                &clamp_data);
           /* Have we handled everything? */
-          if (tx_2 <= 0)
+          if (*tx_2 <= 0)
             return TRUE;
 
           /* clamp ty_1 since we've handled everything with y < 0 */



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]