Преглед изворни кода

CHash: fix bug in Insert() to detect existing entry. This affected NCDInterpProg which made it unable to
detect processes/templated with the same name.

ambrop7 пре 13 година
родитељ
комит
1ab2d67d30
1 измењених фајлова са 1 додато и 1 уклоњено
  1. 1 1
      structure/CHash_impl.h

+ 1 - 1
structure/CHash_impl.h

@@ -115,8 +115,8 @@ static int CHash_Insert (CHash *o, CHashArg arg, CHashRef entry, CHashRef *out_e
         if (CHASH_PARAM_COMPARE_ENTRIES(arg, cur, entry)) {
         if (CHASH_PARAM_COMPARE_ENTRIES(arg, cur, entry)) {
             if (out_existing) {
             if (out_existing) {
                 *out_existing = cur;
                 *out_existing = cur;
-                return 0;
             }
             }
+            return 0;
         }
         }
         link = CHash_next(cur);
         link = CHash_next(cur);
     }
     }