lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] memcpying p->payload?


From: Pomeroy, Marty
Subject: Re: [lwip-users] memcpying p->payload?
Date: Fri, 24 Aug 2012 11:43:17 -0400

 
 
 >>  (unsigned int *)(p->payload+PACKET_HEADER), 
  vs: 
 >>  p->payload+PACKET_HEADER,  
 
 >>  Any reason why I wasn't able to copy it directly from p->payload?

You don't mention what compiler you are using, so here is something you could check:
Since "payload" is void *, the compiler may possibly be adding (PACKET_HEADER * sizeof( int)) to the first but only PACKET_HEADER to the second.  Unlikely, but possible.
 
Marty
 

reply via email to

[Prev in Thread] Current Thread [Next in Thread]