svn commit: trunk/busybox/util-linux

landley at busybox.net landley at busybox.net
Tue Apr 4 16:56:05 UTC 2006


Author: landley
Date: 2006-04-04 09:56:04 -0700 (Tue, 04 Apr 2006)
New Revision: 14746

Log:
You'd think there'd be a compiler warning for "pointless if", wouldn't you?


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


Changeset:
Modified: trunk/busybox/util-linux/mount.c
===================================================================
--- trunk/busybox/util-linux/mount.c	2006-04-04 15:39:23 UTC (rev 14745)
+++ trunk/busybox/util-linux/mount.c	2006-04-04 16:56:04 UTC (rev 14746)
@@ -291,11 +291,11 @@
 		}
 	}
 
-	// Look at the file.  (Not found isn't a failure for remount.)
+	// Look at the file.  (Not found isn't a failure for remount, or for
+	// a synthetic filesystem like proc or sysfs.)
 
 	if (lstat(mp->mnt_fsname, &st));
-
-	if (!(vfsflags & (MS_REMOUNT | MS_BIND | MS_MOVE))) {
+	else if (!(vfsflags & (MS_REMOUNT | MS_BIND | MS_MOVE))) {
 		// Do we need to allocate a loopback device for it?
 
 		if (ENABLE_FEATURE_MOUNT_LOOP && S_ISREG(st.st_mode)) {




More information about the busybox-cvs mailing list