[dia] [scan-build] Dead code - Idempotent operation



commit dbf6c2c05ebb110f04c35cdc74db9dc132a04661
Author: Hans Breuer <hans breuer org>
Date:   Sun Nov 28 14:16:38 2010 +0100

    [scan-build] Dead code - Idempotent operation
    
    Assigned value is always the as the existing value.
    
    Not completely harmless, but a copy constructor not
    copying the color value of it's source.

 objects/Database/compound.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/objects/Database/compound.c b/objects/Database/compound.c
index acbecc3..ec4e93b 100644
--- a/objects/Database/compound.c
+++ b/objects/Database/compound.c
@@ -634,7 +634,7 @@ compound_copy (Compound * comp)
   /* copy the properties */
   copy->num_arms = comp->num_arms;
   copy->line_width = comp->line_width;
-  copy->line_color = copy->line_color;
+  copy->line_color = comp->line_color;
 
   /* this will allocate the object's pointer arrays for handles and
      connection_points */



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