lkml.org 
[lkml]   [2005]   [Mar]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Subject[patch 12/12] scripts/mod/sumversion.c: replace strtok() with strsep()
From
Date

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;
}
_
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2005-03-22 14:10    [W:0.046 / U:0.940 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site