Vincent Zweije <[EMAIL PROTECTED]> writes:

> If you happen to have a variable (or field or in fact any expression)
> of that type (either type "struct x25_address" or type "x25_address"),
> then you can take the size of the variable, instead of the size of the
> type. So you can do:

>     memcpy(&rt.address, &sx25.sx25_addr, sizeof sx25.sx25_addr);

> This will work with either definition of sx25_address.

D'oh, yes, very good point.  That's the clearly better way of doing this;
I got too caught up in the wrong approach.

-- 
Russ Allbery ([EMAIL PROTECTED])             <http://www.eyrie.org/~eagle/>


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to