projects
/
oweals
/
busybox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8465a99
)
mount: fix incorrect usage of strtok (inadvertently used NULL sometimes).
author
Denis Vlasenko
<vda.linux@googlemail.com>
Wed, 9 May 2007 20:38:04 +0000
(20:38 -0000)
committer
Denis Vlasenko
<vda.linux@googlemail.com>
Wed, 9 May 2007 20:38:04 +0000
(20:38 -0000)
the change is "for(xxx)...." -> "if(var) for(xxx)...", but my gcc 4.1.2
adds _158 bytes_!! WTF?? 8(
util-linux/mount.c
patch
|
blob
|
history
diff --git
a/util-linux/mount.c
b/util-linux/mount.c
index 7dd70392a5bfe28dafdbf2bf734ea9038d79a6b6..b76c38ab1d4e2a499b5a5d857a4af66b0af613d3 100644
(file)
--- a/
util-linux/mount.c
+++ b/
util-linux/mount.c
@@
-886,8
+886,7
@@
static int nfsmount(struct mntent *mp, int vfsflags, char *filteropts)
nfsvers = 0;
/* parse options */
-
- for (opt = strtok(filteropts, ","); opt; opt = strtok(NULL, ",")) {
+ if (filteropts) for (opt = strtok(filteropts, ","); opt; opt = strtok(NULL, ",")) {
char *opteq = strchr(opt, '=');
if (opteq) {
static const char *const options[] = {