This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

catch bug


Hi,
  I have caught a bug in hal/arm/arch/current/src/hal_misc.c. I think that
it haven't been found because nobody called it. change 'i++' to 'i--", is it
right?
Best Regards,
james

-------------------------------------
int
hal_msbindex(int mask)
{
    int i;
    for (i = 32;  i >= 0;  i++) {
                                  ^^^^^^
                                 ==> i--
      if (mask & (1<<i)) return (i);
    }
    return (-1);
}





Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]