summaryrefslogtreecommitdiff
path: root/source3/include
diff options
context:
space:
mode:
Diffstat (limited to 'source3/include')
-rw-r--r--source3/include/nt_status.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/source3/include/nt_status.h b/source3/include/nt_status.h
index 471ac47927..4d083106d3 100644
--- a/source3/include/nt_status.h
+++ b/source3/include/nt_status.h
@@ -72,6 +72,12 @@ typedef uint32 WERROR;
}\
} while (0)
+#define W_ERROR_NOT_OK_RETURN(x) do { \
+ if (!W_ERROR_IS_OK(x)) {\
+ return x;\
+ }\
+} while (0)
+
/* The top byte in an NTSTATUS code is used as a type field.
* Windows only uses value 0xC0 as an indicator for an NT error
* and 0x00 for success.