Changeset f20ea02f in rtems


Ignore:
Timestamp:
Nov 9, 2009, 3:20:54 PM (10 years ago)
Author:
Joel Sherrill <joel.sherrill@…>
Branches:
4.10, 4.11, master
Children:
e6000760
Parents:
eecf752
Message:

2009-11-09 Joel Sherrill <joel.sherrill@…>

  • libfs/src/dosfs/msdos_format.c: Rework to avoid overflow on 16-bit targets.
Location:
cpukit
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • cpukit/ChangeLog

    reecf752 rf20ea02f  
     12009-11-09      Joel Sherrill <joel.sherrill@oarcorp.com>
     2
     3        * libfs/src/dosfs/msdos_format.c: Rework to avoid overflow on 16-bit
     4        targets.
     5
    162009-11-09      Joel Sherrill <joel.sherrill@oarcorp.com>
    27
  • cpukit/libfs/src/dosfs/msdos_format.c

    reecf752 rf20ea02f  
    491491      }
    492492      else {
    493         uint32_t gigs = (total_size + (1024 * 1024 * 1024)) / (1024 * 1024 * 1024);
     493        #define ONE_GB (1024L * 1024L * 1024L)
     494        uint32_t gigs = (total_size + ONE_GB) / ONE_GB;
    494495        int b;
    495496        fmt_params->fattype = FAT_FAT32;
Note: See TracChangeset for help on using the changeset viewer.