From b805bcc1b0857959ddf5b4933169bd359db46ba0 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Mon, 6 Aug 2007 10:39:27 +0000 Subject: r24250: Merge W_ERROR_HAVE_NO_MEMORY macro from Samba 4. Guenther (This used to be commit 054084a2359b5069b872b2e630377dc369c31018) --- 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 87de48edbe..f2dab1a7f5 100644 --- a/source3/include/nt_status.h +++ b/source3/include/nt_status.h @@ -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;\ -- cgit