OUT PBOOLEAN OldValue OPTIONAL,
IN BOOLEAN NeedBreaks)
{
- ULONG BreakOnTermination = FALSE;
+ ULONG BreakOnTermination;
- if (OldValue)
- *OldValue = FALSE;
+ /* Initialize to FALSE */
+ if (OldValue) *OldValue = FALSE;
/* Fail, if the critical breaks flag is required but is not set */
- if (NeedBreaks == TRUE &&
+ if ((NeedBreaks) &&
!(NtCurrentPeb()->NtGlobalFlag & FLG_ENABLE_SYSTEM_CRIT_BREAKS))
+ {
return STATUS_UNSUCCESSFUL;
+ }
+ /* Check if the caller wants the old value */
if (OldValue)
{
/* Query and return the old break on termination flag for the process */