summaryrefslogtreecommitdiff
path: root/util-linux
diff options
context:
space:
mode:
authorDenis Vlasenko2007-05-09 20:38:04 +0000
committerDenis Vlasenko2007-05-09 20:38:04 +0000
commit68de7207231fbb3c92487e30b381268737ee2228 (patch)
tree6ea1fc6ef4696f9b425074f1fe8e0c96edb98184 /util-linux
parent8465a99ce79ec805ea2063c3f571e2578650a984 (diff)
downloadbusybox-68de7207231fbb3c92487e30b381268737ee2228.zip
busybox-68de7207231fbb3c92487e30b381268737ee2228.tar.gz
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(
Diffstat (limited to 'util-linux')
-rw-r--r--util-linux/mount.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/util-linux/mount.c b/util-linux/mount.c
index 7dd7039..b76c38a 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)
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[] = {