diff options
author | Denis Vlasenko <vda.linux@googlemail.com> | 2007-05-10 00:38:04 +0400 |
---|---|---|
committer | Denis Vlasenko <vda.linux@googlemail.com> | 2007-05-10 00:38:04 +0400 |
commit | 68de7207231fbb3c92487e30b381268737ee2228 (patch) | |
tree | 6ea1fc6ef4696f9b425074f1fe8e0c96edb98184 /util-linux | |
parent | 8465a99ce79ec805ea2063c3f571e2578650a984 (diff) |
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.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) 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[] = { |