2009-10-22 Ralf Corsépius <ralf.corsepius@rtems.org>

* libblock/include/rtems/flashdisk.h: Use UINT32_C consts to
	avoid implicit int-cast overflows in RTEMS_FDISK_KBYTES.
This commit is contained in:
Ralf Corsepius
2009-10-22 11:56:01 +00:00
parent 4b8a90e523
commit fb5785cce6
2 changed files with 6 additions and 1 deletions
+5
View File
@@ -1,3 +1,8 @@
2009-10-22 Ralf Corsépius <ralf.corsepius@rtems.org>
* libblock/include/rtems/flashdisk.h: Use UINT32_C consts to
avoid implicit int-cast overflows in RTEMS_FDISK_KBYTES.
2009-10-22 Ralf Corsépius <ralf.corsepius@rtems.org>
* libcsupport/include/rtems/error.h: Use ordinal constants for
+1 -1
View File
@@ -95,7 +95,7 @@ typedef struct rtems_fdisk_segment_desc
/**
* Return the number of kilo-bytes.
*/
#define RTEMS_FDISK_KBYTES(_k) ((_k) * 1024)
#define RTEMS_FDISK_KBYTES(_k) (UINT32_C(1024) * (_k))
/**
* Forward declaration of the device descriptor.