Re: NetFilter: portability fixes

From: Rusty Russell (
Date: Fri Jun 02 2000 - 05:48:35 EST

In message <> you write:
> Rusty Russell writes:
> > Does it actually fix anything? Or just save 2 bytes on ARM?
> Oh yes. I thought you read the netfilter mailing list? I posted a
> full explaination there for the change.

Apologies: you are completely correct. My assumption that
sizeof(union { T x }) == sizeof(T) is entirely false; I knew that was
not guaranteed, but I expected it to be obvious.

> > Prefer that approach?
> If you prefer that approach, then use that. Either fixes the problem.

It's probably marginally slower, but I don't want to encourage other
coders to start wantonly memcmp()ing structures.

Patch added to CVS tree.

Consider me educated,

Hacking time.

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to Please read the FAQ at

This archive was generated by hypermail 2b29 : Wed Jun 07 2000 - 21:00:14 EST