aboutsummaryrefslogtreecommitdiff
path: root/sys/kern/subr_blist.c
diff options
context:
space:
mode:
authorDoug Moore <dougm@FreeBSD.org>2019-05-10 23:12:37 +0000
committerDoug Moore <dougm@FreeBSD.org>2019-05-10 23:12:37 +0000
commit12cd7ded684e19d7b482c1bb4a7a76991cbbb1a6 (patch)
tree37924ace21a184fdd74e619139059636b7a1525e /sys/kern/subr_blist.c
parent070e7bf95e5d581479dac0f2d9a812858a4a07da (diff)
downloadsrc-12cd7ded684e19d7b482c1bb4a7a76991cbbb1a6.tar.gz
src-12cd7ded684e19d7b482c1bb4a7a76991cbbb1a6.zip
Don't use _Generic, as many systems don't know about it. Go back to a lo-tech switch statement.
Approved by: kib (mentor) Differential Revision: https://reviews.freebsd.org/D20235
Notes
Notes: svn path=/head/; revision=347472
Diffstat (limited to 'sys/kern/subr_blist.c')
-rw-r--r--sys/kern/subr_blist.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/sys/kern/subr_blist.c b/sys/kern/subr_blist.c
index 892cf13f6bfb..1051334f7793 100644
--- a/sys/kern/subr_blist.c
+++ b/sys/kern/subr_blist.c
@@ -215,18 +215,18 @@ static inline int
bitpos(u_daddr_t mask)
{
- return (_Generic(mask,
+ switch (sizeof(mask)) {
#ifdef HAVE_INLINE_FFSLL
- long long: ffsll(mask) - 1,
-#endif
-#ifdef HAVE_INLINE_FFSL
- long: ffsl(mask) - 1,
+ case sizeof(long long):
+ return (ffsll(mask) - 1);
#endif
#ifdef HAVE_INLINE_FFS
- int: ffs(mask) - 1,
+ case sizeof(int):
+ return (ffs(mask) - 1);
#endif
- default: generic_bitpos(mask)
- ));
+ default:
+ return (generic_bitpos(mask));
+ }
}
/*