From ebe0cedb072baf4c1f4bd81f22745c428ab6b911 Mon Sep 17 00:00:00 2001 From: Pranith Kumar K Date: Tue, 6 Dec 2011 14:00:40 +0530 Subject: protocol/client: Be strict about gfids in fop req Change-Id: I7508ab3a93329bb6a679801fddfcd0e5b0c7c134 BUG: 765198 Signed-off-by: Pranith Kumar K Reviewed-on: http://review.gluster.com/770 Tested-by: Gluster Build System Reviewed-by: Jeff Darcy Reviewed-by: Vijay Bellur --- libglusterfs/src/common-utils.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'libglusterfs') 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); \ -- cgit