Richard L. Hamilton writes:
> in the face of future maintenance.  I would think that the safest,
> most portable, and least tricky approach might be:
> 
> struct {
> uint64_t pad; /* force alignment */
> uint8_t uf[IEEE80211_MTU_MAX]; /* array exactly the right size and type */
> } b;
> #define buf b.uf
> 
> That of course wastes the storage for pad,

Using a union instead fixes that problem.

I'd still prefer to see a plain uint64_t with a rounded-up size.

-- 
James Carlson, Solaris Networking              <james.d.carlson at sun.com>
Sun Microsystems / 1 Network Drive         71.232W   Vox +1 781 442 2084
MS UBUR02-212 / Burlington MA 01803-2757   42.496N   Fax +1 781 442 1677

Reply via email to