summaryrefslogtreecommitdiff
path: root/lib/libutil/gr_util.c
Commit message (Collapse)AuthorAgeFilesLines
* Merge from head to stable/8:Sean Farley2009-12-181-2/+2
| | | | | | | | r200423: Remove a dead store. Notes: svn path=/stable/8/; revision=200683
* Fixed style issues with variable ordering and naming, spacing andSean Farley2008-11-231-75/+97
| | | | | | | | | | | | | | | | | | | | parentheses. Fixed alignment issue in gr_dup() in its assignment of gr_mem using a struct to force alignment without performing alignment mathematics. This was noticed recently with libutil was built with WARNS=6 on platform such as sparc64. Added checks to gr_dup(), gr_equal() and gr_make() to prevent segfaults when examining struct group's with the struct members pointing to NULL's. With fix of alignment issue, restore WARNS?=6. Reviewed by: des MFC after: 1 week Notes: svn path=/head/; revision=185237
* style(9) fixes.Sean Farley2008-11-111-20/+14
| | | | | | | MFC after: 1 week Notes: svn path=/head/; revision=184831
* Add four utility functions related to struct grp processing modeled in-partSean Farley2008-04-231-0/+234
after similar calls related to struct pwd in libutil/pw_util.c: - gr_equal() Perform a deep comparison of two struct grp's. It does a thorough, yet unoptimized comparison of all the members regardless of order. - gr_make() Create a string (see group(5)) from a struct grp. - gr_dup() Duplicate a struct grp. Returns a value that is a single contiguous block of memory. - gr_scan() Create a struct grp from a string (as produced by gr_make()). MFC after: 3 weeks Notes: svn path=/head/; revision=178431