diff options
author | Ralf Corsepius <ralf.corsepius@rtems.org> | 2009-10-22 11:56:01 +0000 |
---|---|---|
committer | Ralf Corsepius <ralf.corsepius@rtems.org> | 2009-10-22 11:56:01 +0000 |
commit | fb5785cce6630acb0cccda767844f106282dcd06 (patch) | |
tree | 7545a3c9bd6d538a07d787cd3cfdef2cebde6990 /cpukit | |
parent | 2009-10-22 Ralf Corsépius <ralf.corsepius@rtems.org> (diff) | |
download | rtems-fb5785cce6630acb0cccda767844f106282dcd06.tar.bz2 |
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.
Diffstat (limited to 'cpukit')
-rw-r--r-- | cpukit/ChangeLog | 5 | ||||
-rw-r--r-- | cpukit/libblock/include/rtems/flashdisk.h | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/cpukit/ChangeLog b/cpukit/ChangeLog index 446e351805..1d9acacc52 100644 --- a/cpukit/ChangeLog +++ b/cpukit/ChangeLog @@ -1,5 +1,10 @@ 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 RTEMS_ERROR_ERRNO, RTEMS_ERROR_PANIC, RTEMS_ERROR_ABORT to avoid implicit constant conversion overflows on 16bit-int targets. 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. |