diff options
author | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2007-11-23 19:25:39 +0000 |
---|---|---|
committer | patacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3> | 2007-11-23 19:25:39 +0000 |
commit | 789f463db7fc2a1613374fb8ea45cdba6cc77136 (patch) | |
tree | 0c84443eb3f566978a47274ece15cd5ce03973a9 /nuttx/lib | |
parent | 403a4936c8fc3756003a28328c18c770bc914b6d (diff) | |
download | px4-nuttx-789f463db7fc2a1613374fb8ea45cdba6cc77136.tar.gz px4-nuttx-789f463db7fc2a1613374fb8ea45cdba6cc77136.tar.bz2 px4-nuttx-789f463db7fc2a1613374fb8ea45cdba6cc77136.zip |
Verified recvfrom()nuttx-3.2
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@402 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/lib')
-rw-r--r-- | nuttx/lib/lib_htonl.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/nuttx/lib/lib_htonl.c b/nuttx/lib/lib_htonl.c index 1cc5b6bcf..0f6cbf224 100644 --- a/nuttx/lib/lib_htonl.c +++ b/nuttx/lib/lib_htonl.c @@ -53,7 +53,10 @@ uint32 htonl(uint32 hl) #ifdef CONFIG_ENDIAN_BIG return hl; #else - return (uint32)htons((uint16)((hl) << 16)) | (uint32)htons((uint16)((hl) & 0xffff)); + return (( (hl) >> 24) | + (((hl) >> 8) & 0x0000ff00) | + (((hl) << 8) & 0x00ff0000) | + ( (hl) << 24)); #endif } |