Comment 6 for bug 1496023

Revision history for this message
Klaus Warnke (k-warnke) wrote :

Your welcome!
Using your decompressor helped me to find some bugs in my compressor.
The packet type decision algorithm is not easy...
And thanks for providing these test data.

Regards,
Klaus Warnke

Btw:
In C it is possible to assign struct variables direct, there is no need to use memcpy().
You can use, for example as

memcpy(&tcp_context->opt_sack_blocks,
    &decoded->opt_sack_blocks,
    sizeof(struct d_tcp_opt_sack));

this direct:

    tcp_context->opt_sack_blocks = decoded->opt_sack_blocks;

if the struct types are the same and its definition is known.
If not, the compiler will complain.
This does not work for array types, even there are known.
Or you put the array into a struct, then it works...