summaryrefslogtreecommitdiffstats
path: root/libcli
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2014-03-04 14:11:09 +1300
committerAndreas Schneider <asn@cryptomilk.org>2014-03-05 16:33:22 +0100
commitf580a7c4ffe6ba5e414cc6382e28751aab77277f (patch)
tree7bd162d5409c53bc30912409e08975675ea3d399 /libcli
parent0b8213ae1cd0129b7a50cf7ba3605512a990520f (diff)
downloadsamba-f580a7c4ffe6ba5e414cc6382e28751aab77277f.tar.gz
samba-f580a7c4ffe6ba5e414cc6382e28751aab77277f.tar.xz
samba-f580a7c4ffe6ba5e414cc6382e28751aab77277f.zip
libcli: Add warning about flow control changing macros in ntstatus.h
Change-Id: I49fec82e55b6bc59d5c0f157df90005f7d891c66 Signed-off-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
Diffstat (limited to 'libcli')
-rw-r--r--libcli/util/ntstatus.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/libcli/util/ntstatus.h b/libcli/util/ntstatus.h
index 22be74a2f1f..5407da0b73d 100644
--- a/libcli/util/ntstatus.h
+++ b/libcli/util/ntstatus.h
@@ -674,6 +674,14 @@ NTSTATUS nt_status_string_to_code(const char *nt_status_str);
#define NT_STATUS_IS_ERR(x) (unlikely((NT_STATUS_V(x) & 0xc0000000) == 0xc0000000))
#define NT_STATUS_EQUAL(x,y) (NT_STATUS_V(x) == NT_STATUS_V(y))
+/*
+ * These macros (with the embedded return) are considered poor coding
+ * style per README.Coding
+ *
+ * Please do not use them in new code, and do not rely on them in
+ * projects external to Samba as they will go away at some point.
+ */
+
#define NT_STATUS_HAVE_NO_MEMORY(x) do { \
if (unlikely(!(x))) { \
return NT_STATUS_NO_MEMORY;\