From 3438f7d5337905fc26d313bbbb086236d5f6ce6b Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Mon, 9 Jul 2007 15:53:08 +0000 Subject: r23771: Merge useful W_ERROR_NOT_OK_RETURN macro from samba4. Guenther (This used to be commit 31d689b2486b23d73618f36febde3e17cba5ca59) --- source3/include/nt_status.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/source3/include/nt_status.h b/source3/include/nt_status.h index 471ac47927..4d083106d3 100644 --- a/source3/include/nt_status.h +++ b/source3/include/nt_status.h @@ -72,6 +72,12 @@ typedef uint32 WERROR; }\ } while (0) +#define W_ERROR_NOT_OK_RETURN(x) do { \ + if (!W_ERROR_IS_OK(x)) {\ + return x;\ + }\ +} while (0) + /* The top byte in an NTSTATUS code is used as a type field. * Windows only uses value 0xC0 as an indicator for an NT error * and 0x00 for success. -- cgit