mirror of
https://github.com/opnsense/src.git
synced 2026-06-09 00:32:25 -04:00
tmpfs: remove IFF macro
Requested by: mjg Reviewed by: markj Sponsored by: The FreeBSD Foundation MFC after: 1 week Differential revision: https://reviews.freebsd.org/D38576
This commit is contained in:
parent
9ff2fbdf2d
commit
b918ee2ce4
2 changed files with 2 additions and 3 deletions
|
|
@ -516,7 +516,6 @@ tmpfs_update(struct vnode *vp)
|
|||
* Convenience macros to simplify some logical expressions.
|
||||
*/
|
||||
#define IMPLIES(a, b) (!(a) || (b))
|
||||
#define IFF(a, b) (IMPLIES(a, b) && IMPLIES(b, a))
|
||||
|
||||
/*
|
||||
* Checks that the directory entry pointed by 'de' matches the name 'name'
|
||||
|
|
|
|||
|
|
@ -547,8 +547,8 @@ tmpfs_alloc_node(struct mount *mp, struct tmpfs_mount *tmp, enum vtype type,
|
|||
* allocated, this must be the request to do it. */
|
||||
MPASS(IMPLIES(tmp->tm_root == NULL, parent == NULL && type == VDIR));
|
||||
|
||||
MPASS(IFF(type == VLNK, target != NULL));
|
||||
MPASS(IFF(type == VBLK || type == VCHR, rdev != VNOVAL));
|
||||
MPASS((type == VLNK) ^ (target == NULL));
|
||||
MPASS((type == VBLK || type == VCHR) ^ (rdev == VNOVAL));
|
||||
|
||||
if (tmp->tm_nodes_inuse >= tmp->tm_nodes_max)
|
||||
return (ENOSPC);
|
||||
|
|
|
|||
Loading…
Reference in a new issue