for (k = 0; k < path1->pins->size; k++) {
p = path1->pins->data[k];
- if (p->lid == p0->lid || p->lid == p1->lid) {
- n++;
- if (2 == n)
- goto branch;
- }
+ if (p->lid == p0->lid)
+ n |= 0x1;
+
+ if (p->lid == p1->lid)
+ n |= 0x2;
+
+ if (0x3 == n)
+ goto branch;
}
}
return -ENOMEM;
}
- if (scf_vector_del(ctx->paths, path0) < 0) {
- scf_loge("i: %d, ctx->paths->size: %d\n", i, ctx->paths->size);
+ if (scf_vector_del(ctx->paths, path0) < 0)
return -1;
- }
+
+ scf_loge("path0: %d, path1: %d\n", path0->index, path1->index);
if (scf_vector_add(path1->childs, path0) < 0) {
ses_path_free(path0);