A question of data types

Jeremy Allison jra at samba.org
Wed Dec 19 13:15:02 GMT 2001


On Tue, Dec 18, 2001 at 07:03:50PM -0800, William E Hooper wrote:
> I've noticed in the samba source (more so in the 3.0 alpha series) that
> some functions are prototyped with one data type (usually an int) but the
> actual use is different (in the case of this e-mail uint32).  A specific
> example is in rpc_server/srv_samr_nt.c where the function
> _samr_query_dom_info() calls account_policy_get() and uses a pointer to
> uint32 where the function declaration in lib/account_pol.c uses a pointer
> to int.  Is there any reason for this mixing of data types?  Or is it
> assumed that the uint32 will be typedef'ed to an int?
> 
> I'm asking this because I don't know if it will make a difference with the
> compiler (in my case gcc 2.95.2pl1).

These are bugs, it shouldn't be done this way. Some of this is old
code. It probably won't make a difference as they are assignment
compatible. Nevertheless, we should fix them. Email any patches
to samba-patches at samba.org.

Thanks,

	Jeremy.




More information about the samba-technical mailing list