Changeset f3ad98f in rtems


Ignore:
Timestamp:
Feb 9, 2005, 3:24:29 AM (15 years ago)
Author:
Ralf Corsepius <ralf.corsepius@…>
Branches:
4.10, 4.11, 4.8, 4.9, master
Children:
3a227b9
Parents:
ad0b1f5
Message:

2005-02-09 Ralf Corsepius <ralf.corsepius@…>

  • libmisc/untar/untar.c (_rtems_octal2ulong): Replace.
Location:
cpukit
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • cpukit/ChangeLog

    rad0b1f5 rf3ad98f  
     12005-02-09      Ralf Corsepius <ralf.corsepius@rtems.org>
     2
     3        * libmisc/untar/untar.c (_rtems_octal2ulong): Replace.
     4
    152005-02-08      Ralf Corsepius <ralf.corsepius@rtems.org>
    26
  • cpukit/libmisc/untar/untar.c

    rad0b1f5 rf3ad98f  
    7171   size_t        i;
    7272   unsigned long num;
    73    unsigned long mult;
    7473
    7574   num = 0;
    76    mult = 1;
    77    for (i=len-1; i>=0; i--)
     75   for (i=0; i < len; i++)
    7876   {
    7977      if ((octascii[i] < '0') || (octascii[i] > '9'))
     
    8179         continue;
    8280      }
    83       num  += mult*((unsigned long)(octascii[i] - '0'));
    84       mult *= 8;
     81      num  = num * 8 + ((unsigned long)(octascii[i] - '0'));
    8582   }
    8683   return(num);
Note: See TracChangeset for help on using the changeset viewer.