RE: Redundant memset in AIO read_events

Chen, Kenneth W (kenneth.w.chen@intel.com)
Wed, 9 Jul 2003 15:43:06 -0700


> <newbie>
> There might be some architecture that requires 16 byte alignment...
> how about surrounding the memcpy with
> if (sizeof(struct io_event) != 4 * sizeof(__u64)) ?
> </newbie>

The point I'm trying to make is that it is irrelevant with respect to
alignment, size, or padding. memset and struct copying has the same
length and destination address. Why bother with the memset? It's the
same as writing a code like this:

blah = 0;
blah = foo;

- Ken
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/