svn commit: r359612 - head/sys/ufs/ufs
Kirk McKusick
mckusick at FreeBSD.org
Fri Apr 3 20:41:54 UTC 2020
Author: mckusick
Date: Fri Apr 3 20:30:45 2020
New Revision: 359612
URL: https://svnweb.freebsd.org/changeset/base/359612
Log:
Convert DOINGSOFTDEP, MOUNTEDSOFTDEP, DOINGSUJ, and MOUNTEDSUJ to being
boolean expressions so that their values are not lost when assigned to
`bool' or `int' variables.
Reviewed by: Chuck Silvers (chs)
MFC after: 3 days
Sponsored by: Netflix
Modified:
head/sys/ufs/ufs/inode.h
Modified: head/sys/ufs/ufs/inode.h
==============================================================================
--- head/sys/ufs/ufs/inode.h Fri Apr 3 19:42:16 2020 (r359611)
+++ head/sys/ufs/ufs/inode.h Fri Apr 3 20:30:45 2020 (r359612)
@@ -230,10 +230,11 @@ struct indir {
#define ITOV(ip) ((ip)->i_vnode)
/* Determine if soft dependencies are being done */
-#define DOINGSOFTDEP(vp) ((vp)->v_mount->mnt_flag & (MNT_SOFTDEP | MNT_SUJ))
-#define MOUNTEDSOFTDEP(mp) ((mp)->mnt_flag & (MNT_SOFTDEP | MNT_SUJ))
-#define DOINGSUJ(vp) ((vp)->v_mount->mnt_flag & MNT_SUJ)
-#define MOUNTEDSUJ(mp) ((mp)->mnt_flag & MNT_SUJ)
+#define DOINGSOFTDEP(vp) \
+ (((vp)->v_mount->mnt_flag & (MNT_SOFTDEP | MNT_SUJ)) != 0)
+#define MOUNTEDSOFTDEP(mp) (((mp)->mnt_flag & (MNT_SOFTDEP | MNT_SUJ)) != 0)
+#define DOINGSUJ(vp) (((vp)->v_mount->mnt_flag & MNT_SUJ) != 0)
+#define MOUNTEDSUJ(mp) (((mp)->mnt_flag & MNT_SUJ) != 0)
/* This overlays the fid structure (see mount.h). */
struct ufid {
More information about the svn-src-all
mailing list