diff options
author | Michael Adam <obnox@samba.org> | 2009-02-25 16:55:28 +0100 |
---|---|---|
committer | Michael Adam <obnox@samba.org> | 2009-02-26 13:22:54 +0100 |
commit | 51795b723eedecbbcb89c822c68ee51151bc6592 (patch) | |
tree | 01ee3bc87ed8dd9276d2828700191719e9685a9e /libcli/util | |
parent | 6c197ffa3090b88663b2507006022fcd438de54c (diff) | |
download | samba-51795b723eedecbbcb89c822c68ee51151bc6592.tar.gz samba-51795b723eedecbbcb89c822c68ee51151bc6592.tar.bz2 samba-51795b723eedecbbcb89c822c68ee51151bc6592.zip |
libcli/util/werror.h: add macro W_ERROR_NOT_OK_GOTO(x, y)
a goto destination can be specified as a second parameter.
Michael
Diffstat (limited to 'libcli/util')
-rw-r--r-- | libcli/util/werror.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/libcli/util/werror.h b/libcli/util/werror.h index 950f009f28..15251a44fc 100644 --- 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) |