linux-kbuild.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] fixdep: constify strrcmp arguments
@ 2015-11-18 18:07 Nicolas Iooss
  2015-12-05  9:43 ` Nicolas Iooss
  0 siblings, 1 reply; 3+ messages in thread
From: Nicolas Iooss @ 2015-11-18 18:07 UTC (permalink / raw)
  To: Michal Marek, linux-kbuild; +Cc: linux-kernel, Nicolas Iooss

strrcmp only performs read access to the memory addressed by its
arguments so make them const pointers.

Signed-off-by: Nicolas Iooss <nicolas.iooss_linux@m4x.org>
---
 scripts/basic/fixdep.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/basic/fixdep.c b/scripts/basic/fixdep.c
index c68fd61fdc42..5b327c67a828 100644
--- a/scripts/basic/fixdep.c
+++ b/scripts/basic/fixdep.c
@@ -251,7 +251,7 @@ static void parse_config_file(const char *map, size_t len)
 }
 
 /* test is s ends in sub */
-static int strrcmp(char *s, char *sub)
+static int strrcmp(const char *s, const char *sub)
 {
 	int slen = strlen(s);
 	int sublen = strlen(sub);
-- 
2.6.2


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-12-07 13:03 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-18 18:07 [PATCH] fixdep: constify strrcmp arguments Nicolas Iooss
2015-12-05  9:43 ` Nicolas Iooss
2015-12-07 13:03   ` Michal Marek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).