summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2007-07-09 15:53:08 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:23:55 -0500
commit3438f7d5337905fc26d313bbbb086236d5f6ce6b (patch)
tree486237c436331be4fe0adad3fac79d9f8399b8ab
parent5512dacbca699ab06df045ca7f1253c6a58251af (diff)
downloadsamba-3438f7d5337905fc26d313bbbb086236d5f6ce6b.tar.gz
samba-3438f7d5337905fc26d313bbbb086236d5f6ce6b.tar.bz2
samba-3438f7d5337905fc26d313bbbb086236d5f6ce6b.zip
r23771: Merge useful W_ERROR_NOT_OK_RETURN macro from samba4.
Guenther (This used to be commit 31d689b2486b23d73618f36febde3e17cba5ca59)
-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.