[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: commit: ldap/servers/slapd controls.c search.c

kurt@OpenLDAP.org writes:
> Don't assume offsetof(foo,firstelement) is zero

It is zero.  ANSI C says:

  A pointer to a structure object, suitably converted, points to its
  initial member (or if that member is a bit-field, then to the unit in
  which it resides), and vice versa.

The change is still good since it's more readable to name the member,