← Commit list

68de72072

Denis Vlasenko
Denis Vlasenko
2007-05-09
FAILED Duration: 11s

Subject

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(

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

util-linux/mount.c+1 -2
@@ -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[] = {