Date: Sat, 27 Mar 2010 17:57:17 +0000 (UTC) From: "Bjoern A. Zeeb" <bz@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r205766 - stable/8/sbin/mount Message-ID: <201003271757.o2RHvHjU058779@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: bz Date: Sat Mar 27 17:57:17 2010 New Revision: 205766 URL: http://svn.freebsd.org/changeset/base/205766 Log: MFC r204840: As statfs.f_flags are uint64_t the local variables should be as well. We'll start noticing this with the next flag introduced as the lower 32bit are all used. While here compare to 0 explicitly [1]. Suggested by: kib [1] Reviewed by: kib Modified: stable/8/sbin/mount/mount.c Directory Properties: stable/8/sbin/mount/ (props changed) Modified: stable/8/sbin/mount/mount.c ============================================================================== --- stable/8/sbin/mount/mount.c Sat Mar 27 17:56:45 2010 (r205765) +++ stable/8/sbin/mount/mount.c Sat Mar 27 17:57:17 2010 (r205766) @@ -91,7 +91,7 @@ char *flags2opts(int); /* Map from mount options to printable formats. */ static struct opt { - int o_opt; + uint64_t o_opt; const char *o_name; } optnames[] = { { MNT_ASYNC, "asynchronous" }, @@ -611,7 +611,7 @@ mountfs(const char *vfstype, const char void prmount(struct statfs *sfp) { - int flags; + uint64_t flags; unsigned int i; struct opt *o; struct passwd *pw; @@ -620,7 +620,7 @@ prmount(struct statfs *sfp) sfp->f_fstypename); flags = sfp->f_flags & MNT_VISFLAGMASK; - for (o = optnames; flags && o->o_opt; o++) + for (o = optnames; flags != 0 && o->o_opt != 0; o++) if (flags & o->o_opt) { (void)printf(", %s", o->o_name); flags &= ~o->o_opt;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201003271757.o2RHvHjU058779>