patch-2_6_7-vs1_9_1_12
[linux-2.6.git] / include / linux / bitmap.h
index 81e73cd..c301d12 100644 (file)
@@ -29,7 +29,8 @@ static inline void bitmap_fill(unsigned long *bitmap, int bits)
 static inline void bitmap_copy(unsigned long *dst,
                        const unsigned long *src, int bits)
 {
-       memcpy(dst, src, BITS_TO_LONGS(bits)*sizeof(unsigned long));
+       int len = BITS_TO_LONGS(bits)*sizeof(unsigned long);
+       memcpy(dst, src, len);
 }
 
 void bitmap_shift_right(unsigned long *dst,