From nobody Wed Feb 15 00:58:00 2023 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4PGfnj0b4gz3qVHY; Wed, 15 Feb 2023 00:58:01 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4PGfnh6tzBz4X00; Wed, 15 Feb 2023 00:58:00 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676422681; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tfqIHpiM1Jc3IDeBjDFI1h9aPqPoxYLq1YsXTRLU7QM=; b=mIVQVLiBLrvBwwsd2AOD1IF/XddS2+Ej6XTCaGMyjeSC10Xl+iI7DEZ5os8mjUL+lz98uq ULy7wC5zuG7lhR/xq6l2O/TX2fLJlkxRXGQmVZBFZMwiADqQxSBw+mQ9CDjYTHSXdo1nLf OfglZtpGgy/BP8R3zMqlXfgFNGCtldegBk6xX20s0/q7ea2ouY9cMp6JzvbvCBCrpHOcni UdIKZnNv+bzK6czFa0ojeOeJq6DHZT7iNmesoy9MMoKFwyVWi5rfNjR8KN/7ilsrQZVxJN T19rkc8BNFu771/+svklfa4oSyA7QqcnnU2zHum2RTgil14qkBgscyI6Gj6lEg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1676422681; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=tfqIHpiM1Jc3IDeBjDFI1h9aPqPoxYLq1YsXTRLU7QM=; b=LA+ioprd0DtgqkrpwRrnvJ/OQr2Ck9NCFfqUJDdWFPHE+ncgrSUvKoV6xQm2GhCuN7IBic 3fulURuxt6FNWfu2dHMZMPvh91d6kwBu/tTkZ5aGbY1nnM4ErBSrvTGa34SIh8rFtNILuD 3ThgFG9XhWPHmnhIPLFpk88tV4GrJMglNSXpx9FDP/xK+zWCZAz7shDJnIr3UHqDN69b84 emNLeP6iR27V4SFSMM6dU52/oCThOSU/MsvZgGecK6G2UxleYi2lqIeZwgGba0JxRk1UcZ 8ikNZ3bQjU4f95iDRupWX4EDG6OgDl+Y2eUEXPLcM+QQ60WMZPxn+GQ1AVnlig== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1676422681; a=rsa-sha256; cv=none; b=tbl6pjnx3+fWej3czeXuhWDF0RL06nBANQrY+r0E762McMi9rnwFuwjEgRIqf7JiVyHTMm RpwRgS2S+Mrou1b77kGhRS+eyt7RftYPtqX/Cqn4RluXygMwzWqzqsWAmAul5Vb59Loxs1 3x0Q5txKzc9whp4af2C9SNmenEzo5Wk/qFD/z5XVLXfbQTfYKUU3NeV9DluvqSqU2q3mi7 uWsNlrh5CrZ+dp9IP3L3qekEABIW3ZYhn47nTu4b2TDBoawvPaKNeOR7KPwJyimVrkR/HU eyKiT559tXhgGUCH5KAwuwrYZ+6VJLFsZsXAr0D6uUDFj587IODbj7mGFdP5/g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4PGfnh5zyBz1KB0; Wed, 15 Feb 2023 00:58:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 31F0w0Ok047951; Wed, 15 Feb 2023 00:58:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 31F0w06E047950; Wed, 15 Feb 2023 00:58:00 GMT (envelope-from git) Date: Wed, 15 Feb 2023 00:58:00 GMT Message-Id: <202302150058.31F0w06E047950@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Konstantin Belousov Subject: git: b918ee2ce485 - main - tmpfs: remove IFF macro List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kib X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b918ee2ce4850253ddd884e39dabecd6e96bf474 Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by kib: URL: https://cgit.FreeBSD.org/src/commit/?id=b918ee2ce4850253ddd884e39dabecd6e96bf474 commit b918ee2ce4850253ddd884e39dabecd6e96bf474 Author: Konstantin Belousov AuthorDate: 2023-02-13 23:47:44 +0000 Commit: Konstantin Belousov CommitDate: 2023-02-15 00:57:41 +0000 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 --- sys/fs/tmpfs/tmpfs.h | 1 - sys/fs/tmpfs/tmpfs_subr.c | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/sys/fs/tmpfs/tmpfs.h b/sys/fs/tmpfs/tmpfs.h index 70ed066ef0f5..eda1c3b12c24 100644 --- a/sys/fs/tmpfs/tmpfs.h +++ b/sys/fs/tmpfs/tmpfs.h @@ -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' diff --git a/sys/fs/tmpfs/tmpfs_subr.c b/sys/fs/tmpfs/tmpfs_subr.c index cfd4787fb712..351ca825f203 100644 --- a/sys/fs/tmpfs/tmpfs_subr.c +++ b/sys/fs/tmpfs/tmpfs_subr.c @@ -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);