diff options
author | Greg Hudson <ghudson@mit.edu> | 2009-11-24 01:25:10 +0000 |
---|---|---|
committer | Greg Hudson <ghudson@mit.edu> | 2009-11-24 01:25:10 +0000 |
commit | d8ea32176611219e8ee3a9281ab8c2f1d718de77 (patch) | |
tree | 485ea22c66460808baa9e26cf6552cec37fdc467 /src/include/k5-int.h | |
parent | d55064e02f1078be49e9ff4200bc98cff7002834 (diff) | |
download | krb5-d8ea32176611219e8ee3a9281ab8c2f1d718de77.zip krb5-d8ea32176611219e8ee3a9281ab8c2f1d718de77.tar.gz krb5-d8ea32176611219e8ee3a9281ab8c2f1d718de77.tar.bz2 |
Punt the volatile cast in the non-gcc, non-Windows version of zap.
Use a function call into libkrb5support instead, since that's hard to
inline.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@23339 dc483132-0cff-0310-8789-dd5450dbe970
Diffstat (limited to 'src/include/k5-int.h')
-rw-r--r-- | src/include/k5-int.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/include/k5-int.h b/src/include/k5-int.h index 2edf1d5..3d52688 100644 --- a/src/include/k5-int.h +++ b/src/include/k5-int.h @@ -790,8 +790,9 @@ static inline void zap(void *ptr, size_t len) asm volatile ("" : : "g" (ptr), "g" (len)); } #else -# define zap(ptr, len) memset((void *)(volatile void *)ptr, 0, len) -#endif /* WIN32 */ +/* Use a function from libkrb5support to defeat inlining. */ +# define zap(ptr, len) krb5int_zap(ptr, len) +#endif /* Convenience function: zap and free ptr if it is non-NULL. */ static inline void |