Use offsetof() in set_header_word to get field offset
authorMarc Dionne <marc.c.dionne@gmail.com>
Thu, 5 Jan 2012 00:27:18 +0000 (19:27 -0500)
committerDerrick Brashear <shadow@dementix.org>
Thu, 5 Jan 2012 02:10:09 +0000 (18:10 -0800)
commit52944ff61a455770da451b551ffa0ae10c19ea2e
treee15c57eed5c8acb2a58c65dad1b0c0fce43e0bcf
parentd4fba5f92db18d77c1fab20af3815637c132bc6f
Use offsetof() in set_header_word to get field offset

Use offsetof() to replace a few instances where the same logic is
open coded in set_header_word and inc_header_word macros.  In cases
where the field name involves a variable as an index to an array,
newer gcc gives a sequence point warning.

Change-Id: I43e3d6ef6a63b51003496a1beb72c445a9109615
Reviewed-on: http://gerrit.openafs.org/6513
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementix.org>
src/budb/database.h
src/kauth/kadatabase.c