summaryrefslogtreecommitdiffstats
path: root/source3/include/smb_macros.h
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2005-05-31 13:46:45 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 10:57:02 -0500
commitf24d88cf9da46680d52b42b92bd484e7b09ce99b (patch)
treeb30342fd7677a0d17306130077995110bfae344a /source3/include/smb_macros.h
parent450e8d5749504f8392c0cfe8b79218f03b88076a (diff)
downloadsamba-f24d88cf9da46680d52b42b92bd484e7b09ce99b.tar.gz
samba-f24d88cf9da46680d52b42b92bd484e7b09ce99b.tar.xz
samba-f24d88cf9da46680d52b42b92bd484e7b09ce99b.zip
r7139: trying to reduce the number of diffs between trunk and 3.0; changing version to 3.0.20pre1
(This used to be commit 9727d05241574042dd3aa8844ae5c701d22e2da1)
Diffstat (limited to 'source3/include/smb_macros.h')
-rw-r--r--source3/include/smb_macros.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/source3/include/smb_macros.h b/source3/include/smb_macros.h
index 7e90f01b5f9..d798d4395e1 100644
--- a/source3/include/smb_macros.h
+++ b/source3/include/smb_macros.h
@@ -43,7 +43,7 @@
* @note You are explicitly allowed to pass NULL pointers -- they will
* always be ignored.
**/
-#define SAFE_FREE(x) do { if ((x) != NULL) {free(CONST_DISCARD(void *, (x))); x=NULL;} } while(0)
+#define SAFE_FREE(x) do { if ((x) != NULL) {free(x); x=NULL;} } while(0)
#endif
/* zero a structure */
@@ -87,6 +87,7 @@
* extern struct current_user current_user;
*/
#define FSP_BELONGS_CONN(fsp,conn) do {\
+ extern struct current_user current_user;\
if (!((fsp) && (conn) && ((conn)==(fsp)->conn) && (current_user.vuid==(fsp)->vuid))) \
return(ERROR_DOS(ERRDOS,ERRbadfid));\
} while(0)
@@ -97,6 +98,7 @@
* extern struct current_user current_user;
*/
#define CHECK_FSP(fsp,conn) do {\
+ extern struct current_user current_user;\
if (!FNUM_OK(fsp,conn)) \
return(ERROR_DOS(ERRDOS,ERRbadfid)); \
else if((fsp)->fd == -1) \
@@ -289,6 +291,9 @@ copy an IP address from one buffer to another
#define TALLOC_REALLOC_ARRAY(ctx, ptr, type, count) (type *)_talloc_realloc_array(ctx, ptr, sizeof(type), count, #type)
#define talloc_destroy(ctx) talloc_free(ctx)
+/* only define PARANOID_MALLOC_CHECKER with --enable-developer and not compiling
+ the smbmount utils */
+
#if defined(DEVELOPER) && !defined(SMBMOUNT_MALLOC)
# define PARANOID_MALLOC_CHECKER 1
#endif