From: domen@coderock.org
To: akpm@osdl.org
Cc: linux-kernel@vger.kernel.org, domen@coderock.org, nikai@nikai.net
Subject: [patch 12/12] scripts/mod/sumversion.c: replace strtok() with strsep()
Date: Sat, 05 Mar 2005 16:35:45 +0100 [thread overview]
Message-ID: <20050305153545.9769F1F1F0@trashy.coderock.org> (raw)
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;
}
_
next reply other threads:[~2005-03-05 15:55 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-03-05 15:35 domen [this message]
2005-03-17 21:23 ` [patch 12/12] scripts/mod/sumversion.c: replace strtok() with strsep() Sam Ravnborg
2005-03-18 2:46 ` Nicolas Kaiser
2005-03-18 5:33 ` Sam Ravnborg
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20050305153545.9769F1F1F0@trashy.coderock.org \
--to=domen@coderock.org \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nikai@nikai.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox