Messages in this thread Patch in this message | | | Subject | [patch 12/12] scripts/mod/sumversion.c: replace strtok() with strsep() | From | domen@coderock ... | Date | Sat, 05 Mar 2005 16:35:45 +0100 |
| |
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/
| |