diff options
author | Richard Braun <rbraun@sceen.net> | 2017-06-15 22:15:31 +0200 |
---|---|---|
committer | Richard Braun <rbraun@sceen.net> | 2017-06-15 22:15:57 +0200 |
commit | f7dd911ee2c78b9fc856e88afae8edc101b25844 (patch) | |
tree | bd77950260592533505299799f9f81936efeb47b /kern/bitmap_i.h | |
parent | 2f3d23605b841f9e4f4c0a13c69a9ff2db033903 (diff) |
kern/bitmap: make bitmap_lookup conform to coding rules
Macros with lower case names must have a function-like interface.
Diffstat (limited to 'kern/bitmap_i.h')
-rw-r--r-- | kern/bitmap_i.h | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/kern/bitmap_i.h b/kern/bitmap_i.h index 11c23eb..dc91a0a 100644 --- a/kern/bitmap_i.h +++ b/kern/bitmap_i.h @@ -29,16 +29,14 @@ * to a bit inside the word pointed by the former. * * Implemented as a macro for const-correctness. - * - * TODO Fix interface. */ -#define bitmap_lookup(bm, bit) \ +#define bitmap_lookup(bmp, bitp) \ MACRO_BEGIN \ int i; \ \ - i = BITMAP_LONGS((bit) + 1) - 1; \ - (bm) += i; \ - (bit) -= i * LONG_BIT; \ + i = BITMAP_LONGS(*(bitp) + 1) - 1; \ + *(bmp) += i; \ + *(bitp) -= i * LONG_BIT; \ MACRO_END static inline unsigned long |