Re: Linuv 2.6.15-rc1

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On Wed, 16 Nov 2005, Zhu Yi wrote:
> 
> Please try the patch below and see if it makes any difference.
> http://bughost.org/bugzilla/show_bug.cgi?id=821

Hmm. That patch does

+	error->log = (struct ipw_event *)((u8 *)error->elem +
 					  (sizeof(*error->elem) * elem_len));

which really can be much more cleanly written as

	error->log = (void *)(error->elem + elem_len);

since pointer addition does the "multiply by pointer element size" on it's 
own.

For future reference, you want to make just a byte add, the cleanest way 
(in kernel, where we use the gcc "void *" additions) is

	newptr = offset + (void *)oldptr;

ho humm..

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

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux