[gegl] ops: fix bug in hstack op



commit f29b2f3897b44239dbbfe073bf214602fadeed75
Author: Øyvind Kolås <pippin gimp org>
Date:   Sun Sep 13 13:38:02 2015 +0200

    ops: fix bug in hstack op
    
    serval2412 yahoo fr [reporter] 2015-09-12 18:03:50 UTC
    
    With gegl updated today, I get this on cppcheck:
    [operations/workshop/hstack.c:93]: (warning) Unnecessary comparison of static
    strings
    
    Indeed, we have this:
     88 static GeglRectangle
     89 get_invalidated_by_change (GeglOperation       *self,
     90                            const gchar         *input_pad,
     91                            const GeglRectangle *region)
     92 {
     93   if (!strcmp ("input_pad", "input"))
    
    I suppose it should be
    if (!strcmp (input_pad, "input"))
    ?

 operations/workshop/hstack.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/operations/workshop/hstack.c b/operations/workshop/hstack.c
index a6a3a9e..55b077b 100644
--- a/operations/workshop/hstack.c
+++ b/operations/workshop/hstack.c
@@ -90,7 +90,7 @@ get_invalidated_by_change (GeglOperation       *self,
                            const gchar         *input_pad,
                            const GeglRectangle *region)
 {
-  if (!strcmp ("input_pad", "input"))
+  if (!strcmp (input_pad, "input"))
     {
       return *region;
     }


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