Mark NT_SUCCESS with various applicable attributes (#20781)

This commit is contained in:
Elias Batek 2025-01-25 22:53:22 +01:00 committed by GitHub
parent 756e2153d8
commit 63630b4287
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -33,7 +33,7 @@ void InitializeObjectAttributes(OBJECT_ATTRIBUTES* p, UNICODE_STRING* n,
}
}
bool NT_SUCCESS(int x) { return x >= 0; }
pragma(inline, true) bool NT_SUCCESS(NTSTATUS x) @safe pure nothrow @nogc { return x >= 0; }
/* In MinGW, NTSTATUS, UNICODE_STRING, STRING and their associated pointer
* type aliases are defined in ntdef.h, ntsecapi.h and subauth.h, each of