svn commit: trunk/busybox/util-linux

vda at busybox.net vda at busybox.net
Wed May 9 20:38:06 UTC 2007


Author: vda
Date: 2007-05-09 13:38:04 -0700 (Wed, 09 May 2007)
New Revision: 18594

Log:
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(


Modified:
   trunk/busybox/util-linux/mount.c


Changeset:
Modified: trunk/busybox/util-linux/mount.c
===================================================================
--- trunk/busybox/util-linux/mount.c	2007-05-09 18:32:54 UTC (rev 18593)
+++ trunk/busybox/util-linux/mount.c	2007-05-09 20:38:04 UTC (rev 18594)
@@ -886,8 +886,7 @@
 	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[] = {




More information about the busybox-cvs mailing list