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.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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.