Hi Werner, thanks for your reply.
On Tue, Jul 23, 2013 at 09:11:22PM -0300, Werner Almesberger wrote: > Alexander Aring wrote: > > When we set it to zero, we can assume that the memory is already zero > > while parsing. > [...] > > - u8 head[100]; > > + u8 head[100] = {}; > > This one doesn't seem to lead to any of the memset/set-to-zero removals. > I looked in 04/12 and had a quick look at the following patches as well. > > Did I miss the simplification(s) enabled by this or does this > initialization play a different role ? u8 head[100] = {}; is the same like: u8 head[100]; memset(head, 0, 100); We need to set it to zero, because we put it on the stack. The first one memset do the compiler. It's ugly to make the 100 byte magic number here, what we need is a number MAX_LOWPAN_HEADER_LENGTH. And this number exists, it's the worst case of the iphc, so that we have a lot of inline data. I can calculate this size, but I am not 100% if this is correct. I put it on the list for next maybe patches. - Alex ------------------------------------------------------------------------------ See everything from the browser to the database with AppDynamics Get end-to-end visibility with application monitoring from AppDynamics Isolate bottlenecks and diagnose root cause in seconds. Start your free trial of AppDynamics Pro today! http://pubads.g.doubleclick.net/gampad/clk?id=48808831&iu=/4140/ostg.clktrk _______________________________________________ Linux-zigbee-devel mailing list Linux-zigbee-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-zigbee-devel