lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <1218322941.24441.11.camel@brick>
Date:	Sat, 09 Aug 2008 16:02:20 -0700
From:	Harvey Harrison <harvey.harrison@...il.com>
To:	David Howells <dhowells@...hat.com>
Cc:	LKML <linux-kernel@...r.kernel.org>
Subject: [PATCH] cred: remove const qualifiers

get_new_cred clearly writes through the pointer, so const isn't
appropriate.  Sparse warns thusly:

include/linux/cred.h: In function ‘get_cred’:
include/linux/cred.h:181: warning: passing argument 1 of ‘get_new_cred’ discards qualifiers from pointer target type

Signed-off-by: Harvey Harrison <harvey.harrison@...il.com>
---
 include/linux/cred.h |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/linux/cred.h b/include/linux/cred.h
index b156ed4..174eb56 100644
--- a/include/linux/cred.h
+++ b/include/linux/cred.h
@@ -176,9 +176,9 @@ static inline struct cred *get_new_cred(struct cred *cred)
  * Get a reference on the specified set of credentials.  The caller must
  * release the reference.
  */
-static inline const struct cred *get_cred(const struct cred *cred)
+static inline struct cred *get_cred(struct cred *cred)
 {
-	return get_new_cred((struct cred *) cred);
+	return get_new_cred(cred);
 }
 
 /**
-- 
1.6.0.rc1.278.g9c632



--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ