From d8c9217cf09285d9e943a3f74d6817a4d14f7664 Mon Sep 17 00:00:00 2001 From: short <> Date: Fri, 22 Nov 2002 13:22:03 +0000 Subject: [PATCH] libcaptive requires strict STATUS_SUCCESS for NT_SUCCESS() - Never pass through 'STATUS_PENDING' and we are generally more strict anyway --- include/ddk/status.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/ddk/status.h b/include/ddk/status.h index 11ce488..05400c1 100644 --- a/include/ddk/status.h +++ b/include/ddk/status.h @@ -10,7 +10,12 @@ #define NT_SEVERITY(StatCode) (((StatCode) >> NTSTAT_SEVERITY_SHIFT) & NTSTAT_SEVERITY_MASK) #define NT_FACILITY(StatCode) (((StatCode) >> NTSTAT_FACILITY_SHIFT) & NTSTAT_FACILITY_MASK) #define NT_CUSTOMER(StatCode) ((StatCode) & NTSTAT_CUSTOMER_MASK) +#ifndef LIBCAPTIVE #define NT_SUCCESS(StatCode) ((NTSTATUS)(StatCode) >= 0) +#else /* !LIBCAPTIVE */ +/* Never pass through 'STATUS_PENDING' and we are generally more strict anyway */ +#define NT_SUCCESS(StatCode) ((NTSTATUS)(StatCode)==STATUS_SUCCESS) +#endif /* !LIBCAPTIVE */ /* * Possible status codes -- 1.8.3.1