From: Günther Deschner Date: Mon, 9 Jul 2007 15:53:08 +0000 (+0000) Subject: r23771: Merge useful W_ERROR_NOT_OK_RETURN macro from samba4. X-Git-Tag: samba-4.0.0alpha6~801^2~5432 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=3438f7d5337905fc26d313bbbb086236d5f6ce6b;p=thirdparty%2Fsamba.git r23771: Merge useful W_ERROR_NOT_OK_RETURN macro from samba4. Guenther (This used to be commit 31d689b2486b23d73618f36febde3e17cba5ca59) --- diff --git a/source3/include/nt_status.h b/source3/include/nt_status.h index 471ac47927a..4d083106d3e 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.