git.samba.org
/
ab
/
samba.git
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6c197ff
)
libcli/util/werror.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, 26 Feb 2009 12:22:54 +0000
(13:22 +0100)
a goto destination can be specified as a second parameter.
Michael
libcli/util/werror.h
patch
|
blob
|
history
diff --git
a/libcli/util/werror.h
b/libcli/util/werror.h
index 950f009f28787f683e4eee59e5bcaef70a95a00e..15251a44fc8e0d14721b6c07254ad6e81f153320 100644
(file)
--- a/
libcli/util/werror.h
+++ b/
libcli/util/werror.h
@@
-66,6
+66,12
@@
typedef uint32_t WERROR;
}\
} while (0)
+#define W_ERROR_NOT_OK_GOTO(x, y) do {\
+ if (!W_ERROR_IS_OK(x)) {\
+ goto y;\
+ }\
+} while(0)
+
/* these are win32 error codes. There are only a few places where
these matter for Samba, primarily in the NT printing code */
#define WERR_OK W_ERROR(0)