Author: gd
Date: 2007-07-09 15:53:08 +0000 (Mon, 09 Jul 2007)
New Revision: 23771

WebSVN: 
http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=23771

Log:
Merge useful W_ERROR_NOT_OK_RETURN macro from samba4.

Guenther

Modified:
   branches/SAMBA_3_0/source/include/nt_status.h
   branches/SAMBA_3_0_26/source/include/nt_status.h


Changeset:
Modified: branches/SAMBA_3_0/source/include/nt_status.h
===================================================================
--- branches/SAMBA_3_0/source/include/nt_status.h       2007-07-09 15:48:17 UTC 
(rev 23770)
+++ branches/SAMBA_3_0/source/include/nt_status.h       2007-07-09 15:53:08 UTC 
(rev 23771)
@@ -72,6 +72,12 @@
        }\
 } 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.

Modified: branches/SAMBA_3_0_26/source/include/nt_status.h
===================================================================
--- branches/SAMBA_3_0_26/source/include/nt_status.h    2007-07-09 15:48:17 UTC 
(rev 23770)
+++ branches/SAMBA_3_0_26/source/include/nt_status.h    2007-07-09 15:53:08 UTC 
(rev 23771)
@@ -72,6 +72,12 @@
        }\
 } 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.

Reply via email to