From: Rob Landley Date: Tue, 4 Apr 2006 16:56:04 +0000 (-0000) Subject: You'd think there'd be a compiler warning for "pointless if", wouldn't you? X-Git-Tag: 1_2_0~585 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=ab8736064b0220c0b7dd3d4226c3f40976a31c53;p=oweals%2Fbusybox.git You'd think there'd be a compiler warning for "pointless if", wouldn't you? --- diff --git a/util-linux/mount.c b/util-linux/mount.c index 42d0eb223..ba55d2480 100644 --- a/util-linux/mount.c +++ b/util-linux/mount.c @@ -291,11 +291,11 @@ static int singlemount(struct mntent *mp) } } - // 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)) {