Apply suggestions from code review

This commit is contained in:
Jaroslav Lobačevski
2022-01-18 21:45:13 +01:00
committed by GitHub
parent 92f5a5f893
commit d1c89562b8

View File

@@ -55,10 +55,11 @@ where
) and
(
fctmp.getArgument(1).getValue().matches("%a%") or
fctmp.getArgument(1).getValue().matches("%w%") or
// unfortunately cannot use numeric value here because // O_APPEND is defined differently on different OSes:
// https://github.com/red/red/blob/92feb0c0d5f91e087ab35fface6906afbf99b603/runtime/definitions.reds#L477-L491
// this may introduce false negatives
fctmp.getArgument(1).getValueText().matches("%O_APPEND%")
fctmp.getArgument(1).(BitwiseOrExpr).getAChild*().getValueText().matches("O_CREAT")
) and
fctmp.getNumberOfArguments() = 2 and
not fctmp.getArgument(0).getValue() = "/dev/null" and