From: Rusty Russell Date: Wed, 25 Feb 2009 00:29:56 +0000 (+1030) Subject: ccanlint clean and move endian.h to top of #includes (tests that it doesn't need... X-Git-Url: https://git.ozlabs.org/?p=ccan;a=commitdiff_plain;h=3404ba2a1b34e766628d5b9febf401011aa6753f ccanlint clean and move endian.h to top of #includes (tests that it doesn't need anything else) --- diff --git a/ccan/endian/endian.h b/ccan/endian/endian.h index 7f601f9a..81db5d94 100644 --- a/ccan/endian/endian.h +++ b/ccan/endian/endian.h @@ -21,7 +21,7 @@ static inline uint32_t swab_u32(uint32_t val) { return ((val & (uint32_t)0x000000ffUL) << 24) | ((val & (uint32_t)0x0000ff00UL) << 8) - | ((val & (uint32_t)0x00ff0000UL) >> 8) + | ((val & (uint32_t)0x00ff0000UL) >> 8) | ((val & (uint32_t)0xff000000UL) >> 24); } diff --git a/ccan/endian/test/run.c b/ccan/endian/test/run.c index 9016e226..2cd25861 100644 --- a/ccan/endian/test/run.c +++ b/ccan/endian/test/run.c @@ -1,7 +1,7 @@ +#include "endian/endian.h" #include #include #include -#include "endian/endian.h" int main(int argc, char *argv[]) {