public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [patch 12/12] scripts/mod/sumversion.c: replace strtok() with strsep()
@ 2005-03-05 15:35 domen
  2005-03-17 21:23 ` Sam Ravnborg
  0 siblings, 1 reply; 4+ messages in thread
From: domen @ 2005-03-05 15:35 UTC (permalink / raw)
  To: akpm; +Cc: linux-kernel, domen, nikai


Replaces strtok() with strsep()
 
 Signed-off-by: Nicolas Kaiser <nikai@nikai.net>
Signed-off-by: Domen Puncer <domen@coderock.org>
---


 kj-domen/scripts/mod/sumversion.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletion(-)

diff -puN scripts/mod/sumversion.c~strtok-scripts_mod_sumversion scripts/mod/sumversion.c
--- kj/scripts/mod/sumversion.c~strtok-scripts_mod_sumversion	2005-03-05 16:13:15.000000000 +0100
+++ kj-domen/scripts/mod/sumversion.c	2005-03-05 16:13:15.000000000 +0100
@@ -419,7 +419,9 @@ void get_src_version(const char *modname
 	*end = '\0';
 
 	md4_init(&md);
-	for (fname = strtok(sources, " "); fname; fname = strtok(NULL, " ")) {
+	while ((fname = strsep(&sources, " ")) != NULL) {
+		if (!*fname)
+			continue;
 		if (!parse_source_files(fname, &md))
 			goto release;
 	}
_

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

end of thread, other threads:[~2005-03-18  5:32 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-03-05 15:35 [patch 12/12] scripts/mod/sumversion.c: replace strtok() with strsep() domen
2005-03-17 21:23 ` Sam Ravnborg
2005-03-18  2:46   ` Nicolas Kaiser
2005-03-18  5:33     ` Sam Ravnborg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox