svn commit: samba r16660 - in trunk/source: include locking

jra at samba.org jra at samba.org
Wed Jun 28 22:33:09 GMT 2006


Author: jra
Date: 2006-06-28 22:33:05 +0000 (Wed, 28 Jun 2006)
New Revision: 16660

WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=16660

Log:
Fix from jason at ncac.gwu.edu for bug #3875,
bad cast warning.
Jeremy.

Modified:
   trunk/source/include/smb.h
   trunk/source/locking/locking.c


Changeset:
Modified: trunk/source/include/smb.h
===================================================================
--- trunk/source/include/smb.h	2006-06-28 22:23:05 UTC (rev 16659)
+++ trunk/source/include/smb.h	2006-06-28 22:33:05 UTC (rev 16660)
@@ -886,6 +886,12 @@
 				 enum brl_flavour lock_flav, \
 				 br_off start, br_off size)
 
+#define LOCKING_FN_CAST() \
+	void (*)(struct share_mode_entry *, const char *, const char *)
+
+#define LOCKING_FN(fn) \
+	void (*fn)(struct share_mode_entry *, const char *, const char *)
+
 struct bitmap {
 	uint32 *b;
 	unsigned int n;

Modified: trunk/source/locking/locking.c
===================================================================
--- trunk/source/locking/locking.c	2006-06-28 22:23:05 UTC (rev 16659)
+++ trunk/source/locking/locking.c	2006-06-28 22:33:05 UTC (rev 16660)
@@ -1274,7 +1274,7 @@
 	const char *sharepath;
 	const char *fname;
 	int i;
-	void (*traverse_callback)(struct share_mode_entry *, const char *, const char *) = state;
+	LOCKING_FN(traverse_callback) = (LOCKING_FN_CAST())state;
 
 	/* Ensure this is a locking_key record. */
 	if (kbuf.dsize != sizeof(struct locking_key))



More information about the samba-cvs mailing list