svn commit: samba r16746 - in trunk/source/rpc_parse: .

vlendec at samba.org vlendec at samba.org
Sat Jul 1 16:56:15 GMT 2006


Author: vlendec
Date: 2006-07-01 16:56:13 +0000 (Sat, 01 Jul 2006)
New Revision: 16746

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

Log:
Fix a warning from a 64-bit build:

rpc_parse/parse_srv.c: In function `srv_io_file_info3':
rpc_parse/parse_srv.c:2407: warning: cast from pointer to integer of different
size
rpc_parse/parse_srv.c:2416: warning: cast from pointer to integer of different size

I think this actually fixes a (VERY unlikely) bug. Imagine fl3->path having an
address where only the high 32 bits are != 0....

Jerry, please check this.

Thanks,

Volker

Modified:
   trunk/source/rpc_parse/parse_srv.c


Changeset:
Modified: trunk/source/rpc_parse/parse_srv.c
===================================================================
--- trunk/source/rpc_parse/parse_srv.c	2006-07-01 15:25:21 UTC (rev 16745)
+++ trunk/source/rpc_parse/parse_srv.c	2006-07-01 16:56:13 UTC (rev 16746)
@@ -2404,7 +2404,7 @@
 	if(!prs_uint32("num_locks    ", ps, depth, &fl3->num_locks))
 		return False;
 
-	uni_p = fl3->path ? (uint32)fl3->path : 0;
+	uni_p = fl3->path ? 1 : 0;
 	if(!prs_uint32("ptr", ps, depth, &uni_p))
 		return False;
 	if (UNMARSHALLING(ps)) {
@@ -2413,7 +2413,7 @@
 		}
 	}
 
-	uni_p = fl3->user ? (uint32)fl3->user : 0;
+	uni_p = fl3->user ? 1 : 0;
 	if(!prs_uint32("ptr", ps, depth, &uni_p))
 		return False;
 	if (UNMARSHALLING(ps)) {



More information about the samba-cvs mailing list