RE: [PATCH 02/15] NFSv4.1: Clean up nfs4_setup_sequence

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> -----Original Message-----
> From: linux-nfs-owner@xxxxxxxxxxxxxxx [mailto:linux-nfs-owner@xxxxxxxxxxxxxxx] On Behalf Of Trond Myklebust
> Sent: Monday, June 14, 2010 2:51 PM
> To: linux-nfs@xxxxxxxxxxxxxxx
> Subject: [PATCH 02/15] NFSv4.1: Clean up nfs4_setup_sequence
> 
> Firstly, there is little point in first zeroing out the entire struct
> nfs4_sequence_res, and then initialising all fields save one. Just
> initialise the last field to zero...

The reason one may want to zero out the entire struct is that in the future, someone may add elements to the struct.  In that case, 
	memset(res, 0, sizeof(*res));
would not have to be changed, and any new elements will "automatically" be initialized to a known value.

Just a thought.

-=# Paul Gilliam #=-
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Filesystem Development]     [Linux USB Development]     [Linux Media Development]     [Video for Linux]     [Linux NILFS]     [Linux Audio Users]     [Yosemite Info]     [Linux SCSI]

  Powered by Linux