Convert fsidcmp(9) from macro to inline function

(cherry picked from commit 3334a537ed)
This commit is contained in:
Konstantin Belousov 2023-12-26 21:39:33 +02:00
parent dc0bf449c2
commit 27acf8db5b

View file

@ -52,7 +52,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.