From: Denis Vlasenko Date: Wed, 9 May 2007 20:38:04 +0000 (-0000) Subject: mount: fix incorrect usage of strtok (inadvertently used NULL sometimes). X-Git-Tag: 1_6_0~78 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=68de7207231fbb3c92487e30b381268737ee2228;p=oweals%2Fbusybox.git 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( --- 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[] = {