r20943: use offsetof() instead of sizeof() - 1 for the packet length
commit4109edc5b651cddd15d1d3c1f84f93f9355bf8ee
authorAndrew Tridgell <tridge@samba.org>
Mon, 22 Jan 2007 03:33:12 +0000 (22 03:33 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 19:43:57 +0000 (10 14:43 -0500)
tree50f6698b539431365489018926b95b926a622372
parent30bfba96d3b7007aa47e037328ea0f2b8e7d1d6e
r20943: use offsetof() instead of sizeof() - 1 for the packet length
calculations. It will be interesting to see how portable this is.

The advantage over the sizeof() method is that it avoids padding
problems after the data[1] array. That was causing us to get valgrind
errors.
(This used to be commit fd8e46043903d3650f8f33dcab165800f6869b1d)
source4/cluster/ctdb/common/ctdb_call.c