git.samba.org
/
obnox
/
samba-ctdb.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bc416e0
)
source/include/nt_status.h: add macro W_ERROR_NOT_OK_GOTO(x, y)
author
Michael Adam
<obnox@samba.org>
Wed, 25 Feb 2009 15:55:28 +0000
(16:55 +0100)
committer
Michael Adam
<obnox@samba.org>
Thu, 19 Mar 2009 17:03:59 +0000
(18:03 +0100)
a goto destination can be specified as a second parameter.
Michael
Signed-off-by: Michael Adam <obnox@samba.org>
source/include/nt_status.h
patch
|
blob
|
history
diff --git
a/source/include/nt_status.h
b/source/include/nt_status.h
index bf35d913f2365e57f30673d86c3abdb3596ca69a..c96ed3cfd7b252612962acb0301e5c91bccdf452 100644
(file)
--- a/
source/include/nt_status.h
+++ b/
source/include/nt_status.h
@@
-89,6
+89,12
@@
typedef uint32 WERROR;
}\
} while (0)
+#define W_ERROR_NOT_OK_GOTO(x, y) do {\
+ if (!W_ERROR_IS_OK(x)) {\
+ goto y;\
+ }\
+} 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.