changeset 904:759b63c3ead1

sasl: Fix size parameter of memset in auth_zero() The size parameter should be the size of auth not its pointer. Flagged by gcc 4.8.1. # gcc --version gcc (Debian 4.8.1-8) 4.8.1 Copyright (C) 2013 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # make ... auth.h:26:24: warning: argument to ‘sizeof’ in ‘memset’ call is the same expression as the destination; did you mean to dereference it? [-Wsizeof-pointer-memaccess] memset(auth, 0, sizeof(auth)); ^ Signed-off-by: Simon Horman <horms@verge.net.au>
author Simon Horman <horms@verge.net.au>
date Wed, 07 Aug 2013 14:09:03 +0900
parents 9684dbe9db77
children c125055b1937
files perdition/auth.h
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/perdition/auth.h	Thu Aug 09 09:03:33 2012 +0900
+++ b/perdition/auth.h	Wed Aug 07 14:09:03 2013 +0900
@@ -23,7 +23,7 @@
 
 static inline void auth_zero(struct auth *auth)
 {
-	memset(auth, 0, sizeof(auth));
+	memset(auth, 0, sizeof *auth);
 }
 
 static inline void auth_set_authorisation_id(struct auth *auth, char *id)