DARWIN: Make crfree() an inline function
authorSimon Wilkinson <sxw@your-file-system.com>
Fri, 30 Mar 2012 18:09:36 +0000 (19:09 +0100)
committerDerrick Brashear <shadow@dementix.org>
Sat, 7 Apr 2012 12:05:49 +0000 (05:05 -0700)
commit1d8937b860509fcaabb041bc14faf7aa3023f3c9
tree056f10f21212fa4487a7f8444973cb654992c530
parent2454e3d96af2be9f316a5c50199d34444defe4a8
DARWIN: Make crfree() an inline function

On Darwin 100, we have
   #define crfree(X) kauth_cred_unref(&X)
which expands in one place to
   kauth_cred_unref(&(afs_ucred_t *)avc->linkData)

clang warns about this in -Werror mode, because arguments to the
address-of operator must be lvalues.

To fix this make crfree an inline function, which will then let us do
the indirection required.

Change-Id: Ic5adb63dcdc11e04c1e428c32e85f33a987fcf42
Reviewed-on: http://gerrit.openafs.org/7073
Reviewed-by: Derrick Brashear <shadow@dementix.org>
Tested-by: Derrick Brashear <shadow@dementix.org>
src/afs/DARWIN/osi_machdep.h