From e151b54dce371111b76b6cb2d0814b2a27826e00 Mon Sep 17 00:00:00 2001 From: Jim McDonough Date: Mon, 18 Nov 2002 20:40:44 +0000 Subject: Revert ADS_ERR_OK change. Some compilers didn't like it. 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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source3') diff --git a/source3/include/ads.h b/source3/include/ads.h index c8801789ae..7f23e6506b 100644 --- a/source3/include/ads.h +++ b/source3/include/ads.h @@ -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 */ -- cgit