From c2528bef90821c70cf2d8938983e43d9727f62cc Mon Sep 17 00:00:00 2001 From: Nong Hoang Tu Date: Sun, 13 Oct 2024 17:28:42 +0700 Subject: [PATCH] Shorter variable calculation of bool type --- src/engine/engine_cores.nim | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/engine/engine_cores.nim b/src/engine/engine_cores.nim index fc9fa36..3c41281 100644 --- a/src/engine/engine_cores.nim +++ b/src/engine/engine_cores.nim @@ -119,10 +119,7 @@ proc yr_rules_is_compiled(path: string, is_compiled: var bool): bool = let f = newFileStream(path) - if f.readStr(4) == "YARA": - is_compiled = true - else: - is_compiled = false + is_compiled = f.readStr(4) == "YARA" f.close() return true except: