Am Freitag, 19. März 2010 22:55:36 schrieb Jeremy Allison:
> On Fri, Mar 19, 2010 at 03:00:09PM +0100, Holger Hetterich wrote:
> > Hi Jeremy, thank you for looking at this!
> > With the argumentation used above, I could cast almost all
> > ints in the asprintf format, because most of the values will
> > never be negative. However it was my original intention to not
> > have to cast all the values inside the asprintf format. :)
> I prefer to keep variables as abstract types, and cast them
> when being used in an asprintf-type function.
> > Also, nearly none of the values will ever be in the range where
> > unsigned/signed does matter. The only exception I see is theoretically
> > the write/pwrite/read/pread call, that returns a size_t as the
> > number of bytes that have been transferred. And even there
> > it's unlikely I'll hit the borders.
> > So in this patch, I am using a size_t for write,read,pread,pwrite,
> > and cast it to unsigned int.
> The way I've been thinking about this in Samba
> has changed over the years. Here's what I do now:
Hi Jeremy, thanks for your comments, I do understand
In this new patch, I keep any data types as is, and just
cast them right in the asprintf, or - when it's immediately
Like the patch before, it reenables the rmdir function, as it
was missing in the function pointer table.
Additionally, this patch adds copying the mode_t parameter
into the corresponding data structure for the smb_traffic_analyzer_open
function, this was forgotten.
Holger Hetterich, hhetter@xxxxxxxxxx,
SUSE LINUX Products GmbH, GF: Markus Rex, HRB 16746 (AG Nürnberg)
Maxfeldstr. 5, 90409 Nürnberg, Germany
Description: Text Data