aboutsummaryrefslogtreecommitdiff
path: root/sys/sys
diff options
context:
space:
mode:
authorKonstantin Belousov <kib@FreeBSD.org>2023-12-26 19:39:33 +0000
committerKonstantin Belousov <kib@FreeBSD.org>2024-01-02 00:42:14 +0000
commitce248ddce72fea1a6069434336bd4e4a144ab30c (patch)
treeb294b78610ca295c147d4504d153a7485d03140d /sys/sys
parentd850efed891a89d2522895455ef5d9945cdd7af1 (diff)
downloadsrc-ce248ddce72fea1a6069434336bd4e4a144ab30c.tar.gz
src-ce248ddce72fea1a6069434336bd4e4a144ab30c.zip
Convert fsidcmp(9) from macro to inline function
(cherry picked from commit 3334a537ed385e487a47208dab8f36b25643bcdb)
Diffstat (limited to 'sys/sys')
-rw-r--r--sys/sys/mount.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/sys/mount.h b/sys/sys/mount.h
index 9c1862956812..bb8719d8a4f1 100644
--- a/sys/sys/mount.h
+++ b/sys/sys/mount.h
@@ -51,7 +51,12 @@
typedef struct fsid { int32_t val[2]; } fsid_t; /* filesystem id type */
-#define fsidcmp(a, b) memcmp((a), (b), sizeof(fsid_t))
+/* Returns non-zero if fsids are different. */
+static inline int
+fsidcmp(const fsid_t *a, const fsid_t *b)
+{
+ return (a->val[0] != b->val[0] || a->val[1] != b->val[1]);
+}
/*
* File identifier.