Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 79327 - the function hal_msbindex() has error
Summary: the function hal_msbindex() has error
Alias: None
Product: eCos
Classification: Retired
Component: HAL
Version: 1.3.1
Hardware: arm7
OS: Linux
Target Milestone: ---
Assignee: eCos bugs internal list
QA Contact: eCos bugs internal list
Depends On:
TreeView+ depends on / blocked
Reported: 2002-12-10 06:13 UTC by Need Real Name
Modified: 2007-04-18 16:48 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2003-06-20 16:17:58 UTC

Attachments (Terms of Use)

Description Need Real Name 2002-12-10 06:13:56 UTC
From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows 98)

Description of problem:
int hal_msbindex(int mask)
    int i;
    for (i = 32;  i >= 0;  i++) {
      if (mask & (1<<i)) return (i);
    return (-1);

It should be 

int hal_msbindex(int mask)
    int i;
    for (i = 31;  i >= 0;  i--) {
      if (mask & (1<<i)) return (i);
    return (-1);

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1.look it 
2.think it

Additional info:

Comment 1 Alex Schuilenburg 2003-06-20 16:17:58 UTC
This bug has moved to

Note You need to log in before you can comment on or make changes to this bug.