summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libcli/util/werror.h6
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)