X-Git-Url: http://git.ozlabs.org/?p=ccan;a=blobdiff_plain;f=ccan%2Fbitmap%2Fbitmap.h;h=50086c065303d06f435c472eed11439cf8048e49;hp=f43449d79f20f6b280a8d1a8881a3e4fe0ff3610;hb=9273220c47005235da7cfed1221e13dd19065093;hpb=8f6c40bce722642ff7e253a675b8ce6cd7e7a091;ds=sidebyside diff --git a/ccan/bitmap/bitmap.h b/ccan/bitmap/bitmap.h index f43449d7..50086c06 100644 --- a/ccan/bitmap/bitmap.h +++ b/ccan/bitmap/bitmap.h @@ -38,9 +38,9 @@ static inline bitmap *bitmap_alloc(int nbits) static inline bitmap_word bitmap_bswap(bitmap_word w) { if (BITMAP_WORD_BITS == 32) - return cpu_to_be32(w); + return (ENDIAN_CAST bitmap_word)cpu_to_be32(w); else if (BITMAP_WORD_BITS == 64) - return cpu_to_be64(w); + return (ENDIAN_CAST bitmap_word)cpu_to_be64(w); } #define BITMAP_WORD(_bm, _n) ((_bm)[(_n) / BITMAP_WORD_BITS].w)