BusyBox Bug and Patch Tracking
BusyBox
  

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0000875 [uClibc] Architecture Specific block always 05-18-06 17:23 05-25-06 18:34
Reporter bengtsjolen View Status public  
Assigned To uClibc
Priority normal Resolution fixed  
Status closed   Product Version 0.9.28
Summary 0000875: uClibc/utils/bswap.h has swapped bswap_16/bswap_32 funcs
Description bswap_32 swaps 16-bits and bswap_16 swaps 32 bits:
Additional Information current part of bswap.h in uClibc/utils/bswap.h in svn repository:


static inline uint32_t bswap_32(uint32_t x)
{
    return ((((x) & 0xff00) >> 8) | \
            (((x) & 0x00ff) << 8));
}
static inline uint16_t bswap_16(uint16_t x)
{
    return ((((x) & 0xff000000) >> 24) | \
            (((x) & 0x00ff0000) >> 8) | \
            (((x) & 0x0000ff00) << 8) | \
            (((x) & 0x000000ff) << 24));
}



should of course be:



static inline uint32_t bswap_32(uint32_t x)
{
    return ((((x) & 0xff000000) >> 24) | \
            (((x) & 0x00ff0000) >> 8) | \
            (((x) & 0x0000ff00) << 8) | \
            (((x) & 0x000000ff) << 24));
}

static inline uint16_t bswap_16(uint16_t x)
{
    return ((((x) & 0xff00) >> 8) | \
            (((x) & 0x00ff) << 8));
}
Attached Files

- Relationships

- Notes
(0001371)
psm
05-18-06 19:32

instead of that header byteswap.h could be used
 
(0001382)
vapier
05-25-06 18:34

swapped func names in svn

not a big deal considering every supported system is Linux
 

- Issue History
Date Modified Username Field Change
05-18-06 17:23 bengtsjolen New Issue
05-18-06 17:23 bengtsjolen Status new => assigned
05-18-06 17:23 bengtsjolen Assigned To  => uClibc
05-18-06 19:32 psm Note Added: 0001371
05-25-06 18:34 vapier Note Added: 0001382
05-25-06 18:34 vapier Status assigned => closed
05-25-06 18:34 vapier Resolution open => fixed
05-25-06 18:34 vapier Summary uClibc/utils/bswap.h still has broken bswap_16/bswap_32 => uClibc/utils/bswap.h has swapped bswap_16/bswap_32 funcs


Copyright © 2000 - 2006 Mantis Group
Powered by Mantis Bugtracker