Commit b650e37281a626fa889b5138c34c9dd1436506af

Thomas de Grivel 2024-12-12T13:16:03

optimize branch

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
diff --git a/libkc3/kc3.c b/libkc3/kc3.c
index e01f23f..bd667bc 100644
--- a/libkc3/kc3.c
+++ b/libkc3/kc3.c
@@ -431,11 +431,11 @@ s_tag * kc3_if_then_else (s_tag *cond, s_tag *then,
       }
     }
     tag_clean(&cond_eval);
-  }
-  if (cond_bool) {
-    if (! env_eval_tag(g_kc3_env, then, dest))
-      return NULL;
-    return dest;
+    if (cond_bool) {
+      if (! env_eval_tag(g_kc3_env, then, dest))
+        return NULL;
+      return dest;
+    }
   }
   if (! env_eval_tag(g_kc3_env, else_, dest))
     return NULL;