[rtems commit] dosfs: PR2091: Fix warning

Sebastian Huber sebh at rtems.org
Wed Feb 27 09:55:55 UTC 2013


Module:    rtems
Branch:    master
Commit:    24345557085981fd7ad413810460bddb252d2265
Changeset: http://git.rtems.org/rtems/commit/?id=24345557085981fd7ad413810460bddb252d2265

Author:    Andreas Heinig <andreas.heinig at cs.tu-dortmund.de>
Date:      Wed Feb 27 11:00:26 2013 +0100

dosfs: PR2091: Fix warning

---

 cpukit/libfs/src/dosfs/msdos_format.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/cpukit/libfs/src/dosfs/msdos_format.c b/cpukit/libfs/src/dosfs/msdos_format.c
index 49015e8..a939df5 100644
--- a/cpukit/libfs/src/dosfs/msdos_format.c
+++ b/cpukit/libfs/src/dosfs/msdos_format.c
@@ -40,6 +40,8 @@
 #include "msdos.h"
 #include "dosfs.h"
 
+#define ONE_GB (1024L * 1024L * 1024L)
+
 typedef struct {
   uint32_t bytes_per_sector;
   uint32_t totl_sector_cnt;
@@ -462,7 +464,6 @@ msdos_set_default_sectors_per_cluster_for_fattype(
     fmt_params->sectors_per_cluster = 2;
   }
   else {
-    #define ONE_GB ( 1024L * 1024L * 1024L )
     uint32_t gigs = ( total_size + ONE_GB ) / ONE_GB;
     int b;
     /* scale with the size of disk... */
@@ -601,7 +602,6 @@ static int msdos_format_determine_fmt_params
       fmt_params->sectors_per_cluster = 2;
     }
     else {
-      #define ONE_GB (1024L * 1024L * 1024L)
       uint32_t gigs = (total_size + ONE_GB) / ONE_GB;
       int b;
       fmt_params->fattype = FAT_FAT32;




More information about the vc mailing list