Skip to content

Commit

Permalink
Shorter variable calculation of bool type
Browse files Browse the repository at this point in the history
  • Loading branch information
dmknght committed Oct 13, 2024
1 parent b122c04 commit c2528be
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/engine/engine_cores.nim
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit c2528be

Please sign in to comment.