diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2007-05-09 20:38:04 +0000 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2007-05-09 20:38:04 +0000 |
commit | 68de7207231fbb3c92487e30b381268737ee2228 (patch) | |
tree | 6ea1fc6ef4696f9b425074f1fe8e0c96edb98184 | |
parent | 8465a99ce79ec805ea2063c3f571e2578650a984 (diff) | |
download | busybox-w32-68de7207231fbb3c92487e30b381268737ee2228.tar.gz busybox-w32-68de7207231fbb3c92487e30b381268737ee2228.tar.bz2 busybox-w32-68de7207231fbb3c92487e30b381268737ee2228.zip |
mount: fix incorrect usage of strtok (inadvertently used NULL sometimes).
the change is "for(xxx)...." -> "if(var) for(xxx)...", but my gcc 4.1.2
adds _158 bytes_!! WTF?? 8(
-rw-r--r-- | util-linux/mount.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/util-linux/mount.c b/util-linux/mount.c index 7dd70392a..b76c38ab1 100644 --- a/util-linux/mount.c +++ b/util-linux/mount.c | |||
@@ -886,8 +886,7 @@ static int nfsmount(struct mntent *mp, int vfsflags, char *filteropts) | |||
886 | nfsvers = 0; | 886 | nfsvers = 0; |
887 | 887 | ||
888 | /* parse options */ | 888 | /* parse options */ |
889 | 889 | if (filteropts) for (opt = strtok(filteropts, ","); opt; opt = strtok(NULL, ",")) { | |
890 | for (opt = strtok(filteropts, ","); opt; opt = strtok(NULL, ",")) { | ||
891 | char *opteq = strchr(opt, '='); | 890 | char *opteq = strchr(opt, '='); |
892 | if (opteq) { | 891 | if (opteq) { |
893 | static const char *const options[] = { | 892 | static const char *const options[] = { |