From 46d8abb11ac052754c116f54496107a19aa15220 Mon Sep 17 00:00:00 2001
From: Christian Gram Kalhauge <chrg@dtu.dk>
Date: Fri, 21 Mar 2025 10:19:49 +0100
Subject: [PATCH] Make the check the right way around

---
 rtree-c/src/ReduceC.hs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/rtree-c/src/ReduceC.hs b/rtree-c/src/ReduceC.hs
index 42cf7a9..576a047 100644
--- a/rtree-c/src/ReduceC.hs
+++ b/rtree-c/src/ReduceC.hs
@@ -97,7 +97,7 @@ reduceCTranslUnit (C.CTranslUnit es ni) ctx = do
         if funIsStatic fun
           then do
             let fstr = C.identToString (funName fun)
-            isStatic <- check ("remove static from " <> fstr, funPosition fun)
+            isStatic <- not <$> check ("remove static from " <> fstr, funPosition fun)
             pure fun{funIsStatic = isStatic}
           else pure fun
       else pure _functions
-- 
GitLab