r24250: Merge W_ERROR_HAVE_NO_MEMORY macro from Samba 4.
authorGünther Deschner <gd@samba.org>
Mon, 6 Aug 2007 10:39:27 +0000 (10:39 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 17:29:21 +0000 (12:29 -0500)
Guenther

source/include/nt_status.h

index 87de48edbe4ccc60dee3ceadef1ec35e4173e13a..f2dab1a7f57f8323cdd9a17eb4d355499550e9a5 100644 (file)
@@ -71,6 +71,12 @@ typedef uint32 WERROR;
        }\
 } while (0)
 
+#define W_ERROR_HAVE_NO_MEMORY(x) do { \
+       if (!(x)) {\
+               return WERR_NOMEM;\
+       }\
+} while (0)
+
 #define W_ERROR_NOT_OK_RETURN(x) do { \
        if (!W_ERROR_IS_OK(x)) {\
                return x;\