aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/autofs/autounmountd.c
diff options
context:
space:
mode:
authorRyan Moeller <freqlabs@FreeBSD.org>2020-05-21 01:55:35 +0000
committerRyan Moeller <freqlabs@FreeBSD.org>2020-05-21 01:55:35 +0000
commit245bfd34da590e12884bd1a5677f3227a36d4bcf (patch)
treebd3f30b09ed71ce881641d920535207ad89d75dc /usr.sbin/autofs/autounmountd.c
parent49caa483b3fafffd9cf5197eb30e8bb235aa7410 (diff)
downloadsrc-245bfd34da590e12884bd1a5677f3227a36d4bcf.tar.gz
src-245bfd34da590e12884bd1a5677f3227a36d4bcf.zip
Deduplicate fsid comparisons
Comparing fsid_t objects requires internal knowledge of the fsid structure and yet this is duplicated across a number of places in the code. Simplify by creating a fsidcmp function (macro). Reviewed by: mjg, rmacklem Approved by: mav (mentor) MFC after: 1 week Sponsored by: iXsystems, Inc. Differential Revision: https://reviews.freebsd.org/D24749
Notes
Notes: svn path=/head/; revision=361313
Diffstat (limited to 'usr.sbin/autofs/autounmountd.c')
-rw-r--r--usr.sbin/autofs/autounmountd.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/usr.sbin/autofs/autounmountd.c b/usr.sbin/autofs/autounmountd.c
index 25c29e739380..006ab697208d 100644
--- a/usr.sbin/autofs/autounmountd.c
+++ b/usr.sbin/autofs/autounmountd.c
@@ -67,8 +67,7 @@ automounted_find(fsid_t fsid)
struct automounted_fs *af;
TAILQ_FOREACH(af, &automounted, af_next) {
- if (af->af_fsid.val[0] == fsid.val[0] &&
- af->af_fsid.val[1] == fsid.val[1])
+ if (fsidcmp(&af->af_fsid, &fsid) == 0)
return (af);
}