From 68de7207231fbb3c92487e30b381268737ee2228 Mon Sep 17 00:00:00 2001 From: Denis Vlasenko Date: Wed, 9 May 2007 20:38:04 +0000 Subject: [PATCH] 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( --- util-linux/mount.c | 3 +-- 1 file changed, 1 insertion(+), 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[] = {