kernel-janitors.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [KJ] [UPDATE PATCH] scripts/mod/sumversion.c: replace strtok() with
@ 2005-02-08 11:27 Nicolas Kaiser
  0 siblings, 0 replies; only message in thread
From: Nicolas Kaiser @ 2005-02-08 11:27 UTC (permalink / raw)
  To: kernel-janitors

[-- Attachment #1: Type: text/plain, Size: 725 bytes --]

* Nicolas Kaiser <nikai@nikai.net>:
>  http://janitor.kernelnewbies.org/docs/driver-howto.html#3.3.1

> Did I miss anything?

Actually, I did miss something. Here comes an update.

Did I miss anything else?

Cheers,
n.


 Description: Replaces strtok() with strsep()
 
 Signed-off-by: Nicolas Kaiser <nikai@nikai.net>

--- scripts/mod/sumversion.c.orig	2005-02-08 01:53:38.000000000 +0100
+++ scripts/mod/sumversion.c	2005-02-08 12:13:49.614979976 +0100
@@ -419,7 +419,9 @@
 	*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;
 	}

[-- Attachment #2: Type: text/plain, Size: 167 bytes --]

_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
http://lists.osdl.org/mailman/listinfo/kernel-janitors

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-02-08 11:27 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-02-08 11:27 [KJ] [UPDATE PATCH] scripts/mod/sumversion.c: replace strtok() with Nicolas Kaiser

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).