diff options
Diffstat (limited to 'rpc/rpc-lib/src/rpcsvc.c')
-rw-r--r-- | rpc/rpc-lib/src/rpcsvc.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/rpc/rpc-lib/src/rpcsvc.c b/rpc/rpc-lib/src/rpcsvc.c index d62e06cb187..b3916eb54c2 100644 --- a/rpc/rpc-lib/src/rpcsvc.c +++ b/rpc/rpc-lib/src/rpcsvc.c @@ -36,7 +36,6 @@ #include <fnmatch.h> #include <stdarg.h> #include <stdio.h> -#include <math.h> #include <dlfcn.h> #ifdef IPV6_DEFAULT @@ -89,12 +88,6 @@ rpcsvc_toggle_queue_status(rpcsvc_program_t *prog, return; } -static int -get_rightmost_set_bit(int n) -{ - return log2(n & -n); -} - int rpcsvc_get_free_queue_index(rpcsvc_program_t *prog) { @@ -109,7 +102,8 @@ rpcsvc_get_free_queue_index(rpcsvc_program_t *prog) right_most_unset_bit = 0; break; } else { - right_most_unset_bit = get_rightmost_set_bit( + /* get_rightmost_set_bit (sic)*/ + right_most_unset_bit = __builtin_ctz( ~prog->request_queue_status[i]); if (right_most_unset_bit < 8) { break; |