diff --git a/cpukit/ChangeLog b/cpukit/ChangeLog index 446e351805..1d9acacc52 100644 --- a/cpukit/ChangeLog +++ b/cpukit/ChangeLog @@ -1,3 +1,8 @@ +2009-10-22 Ralf Corsépius + + * 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 * libcsupport/include/rtems/error.h: Use ordinal constants for diff --git a/cpukit/libblock/include/rtems/flashdisk.h b/cpukit/libblock/include/rtems/flashdisk.h index 4240060596..37ef9a6a25 100644 --- a/cpukit/libblock/include/rtems/flashdisk.h +++ b/cpukit/libblock/include/rtems/flashdisk.h @@ -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.