updat code

This commit is contained in:
Nick Peng
2018-04-24 00:24:44 +08:00
parent c6af293927
commit d3960e1018
14 changed files with 744 additions and 175 deletions

View File

@@ -5,6 +5,8 @@
#include <string.h>
#include <stdlib.h>
#include "bitops.h"
#include "findbit.h"
#define DECLARE_BITMAP(name,bits) \
unsigned long name[BITS_TO_LONGS(bits)]
@@ -101,7 +103,7 @@ static inline int test_and_set_bit(int nr, unsigned long *addr)
*/
static inline unsigned long *bitmap_alloc(int nbits)
{
return calloc(1, BITS_TO_LONGS(nbits) * sizeof(unsigned long));
return (unsigned long *)calloc(1, BITS_TO_LONGS(nbits) * sizeof(unsigned long));
}
/*