Coding style notes on cifsdd

James Peach jpeach at samba.org
Wed Feb 1 06:06:57 GMT 2006


On Wed, 2006-02-01 at 13:28 +1100, Andrew Bartlett wrote:
> James,
> 
> You asked for feedback on the new cifsdd.  The main points I came up
> with were style, which just felt 'odd'.  In particular:

I used to have a very pedantic style, but after a while switching
between codebases, I now tend to be pretty ad-hoc :)

> static struct dd_iohandle *
> open_fd_handle(const char * path, uint64_t iosz, int options)
> {
> 
> compared with 
> 
> static struct dd_iohandle *open_fd_handle(const char *path, 
> 					  uint64_t io_size, int options)
> {

Fixed.

> We don't put a space between * and the variable name

This is a pet hate of mine. I'll go through and remove these spaces
tomorrow :(

> and iosz feeling scarily close to Hungarian notation :-).  

But it is shorter that io_size, which is a plus. I can go through and
rename things like this if you'd prefer?

> BTW, never refer to the param/ code for coding style, it's just weird...
> 
> Other than that, I'm just waiting for the smb2 support :-)

Maybe one day ...

-- 
James Peach | jpeach at samba.org



More information about the samba-technical mailing list