Revert ADS_ERR_OK change. Some compilers didn't like it.
authorJim McDonough <jmcd@samba.org>
Mon, 18 Nov 2002 20:40:44 +0000 (20:40 +0000)
committerJim McDonough <jmcd@samba.org>
Mon, 18 Nov 2002 20:40:44 +0000 (20:40 +0000)
The problem is that ADS_ERR_OK() run on a function that returns an ADS_STATUS
causes the function to be run mulitple times...so you have to return a status,
then check it with the macro.
(This used to be commit c03d6198f28ab37ba0c3224bd50779357270486d)

source3/include/ads.h

index c8801789ae4f9cfe95b40774926dec9bcec3945b..7f23e6506b133676ea9b5328f8a74fc67a687f63 100644 (file)
@@ -67,7 +67,7 @@ typedef void **ADS_MODLIST;
 #define ADS_ERROR_GSS(rc, minor) ads_build_error(ADS_ERROR_GSS, rc, minor)
 #define ADS_ERROR_NT(rc) ads_build_nt_error(ADS_ERROR_NT,rc)
 
-#define ADS_ERR_OK(status) ({ADS_STATUS errokstat = status;(errokstat.error_type == ADS_ERROR_NT) ? NT_STATUS_IS_OK(errokstat.err.nt_status):(errokstat.err.rc == 0);})
+#define ADS_ERR_OK(status) ((status.error_type == ADS_ERROR_NT) ? NT_STATUS_IS_OK(status.err.nt_status):(status.err.rc == 0))
 #define ADS_SUCCESS ADS_ERROR(0)
 
 /* time between reconnect attempts */