On Thu, 27 Mar 2003, Anton Altaparmakov wrote:
> I like unnamed structs and unions a lot as I think they make for a very
> nice abstraction and a huge shorthand when writing code. I absolutely
> *despise* code like this:
>
> ATTR_RECORD *a;
>
> if (a->non_resident)
> a->n.data_size = 0;
> else
> a->r.value_length = 0;
>
> *much* nicer to have:
>
> ATTR_RECORD *a;
>
> if (a->non_resident)
> a->data_size = 0;
> else
> a->value_length = 0;
Happy you mentioned :) Please add to these the endianess mess what the ntfs
code has and look some other code how these are solved elegantly.
Szaka
|