Michael Tüxen <Michael.Tuexen@...> writes:

> > It seems to be less readable version of:
> >  dup_list = (guint32 *) &sack_header->gaps[nr];
> This code should also point to the right place in memory, assuming
> the correct alignment. dup_list is 4 byte aligned if and only if
> sack_header is.

It's definitely nicer ... but I wonder if it could lead to a different
compiler/clang warning about possibly accessing memory past the struct (i.e., if
nr >= 1), since there's only 1 struct gaps element declared.  For clarity, it's
probably worth a shot.

... but speaking of nr ... isn't it being used uninitialized?


___________________________________________________________________________
Sent via:    Wireshark-dev mailing list <wireshark-dev@wireshark.org>
Archives:    http://www.wireshark.org/lists/wireshark-dev
Unsubscribe: https://wireshark.org/mailman/options/wireshark-dev
             mailto:wireshark-dev-requ...@wireshark.org?subject=unsubscribe

Reply via email to