Subject: Re: file id alignment
To: None <tech-kern@NetBSD.org>
From: der Mouse <mouse@Rodents.Montreal.QC.CA>
List: tech-kern
Date: 06/30/2006 19:29:06
> > - struct tmpfs_fid *tfhp;
> > + struct tmpfs_fid tfh;
> you need to ensure that any padding bytes in tfh are properly
> initialized.
Why? If they're padding bytes, by definition they do not belong to any
of the struct fields and anything depending on them is broken. (I
don't think C promises that padding bytes are copied when you do a
struct assignment, for example.)
/~\ The ASCII der Mouse
\ / Ribbon Campaign
X Against HTML mouse@rodents.montreal.qc.ca
/ \ Email! 7D C8 61 52 5D E7 2D 39 4E F1 31 3E E8 B3 27 4B