summaryrefslogtreecommitdiffstats
path: root/libglusterfs
diff options
context:
space:
mode:
Diffstat (limited to 'libglusterfs')
-rw-r--r--libglusterfs/src/common-utils.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/libglusterfs/src/common-utils.h b/libglusterfs/src/common-utils.h
index d17573e2da6..a253e675150 100644
--- a/libglusterfs/src/common-utils.h
+++ b/libglusterfs/src/common-utils.h
@@ -141,6 +141,14 @@ extern char *gf_mgmt_list[GF_MGMT_MAXVALUE];
} \
}while (0);
+#define GF_ASSERT_AND_GOTO_WITH_ERROR(name, arg, label, errno, error) do { \
+ if (!arg) { \
+ GF_ASSERT (0) \
+ errno = error; \
+ goto label; \
+ } \
+ }while (0);
+
#define GF_VALIDATE_ABSOLUTE_PATH_OR_GOTO(name,arg,label) \
do { \
GF_VALIDATE_OR_GOTO (name, arg, label); \