mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2025-12-26 22:48:23 +00:00
2010-04-13 Ralf Corsépius <ralf.corsepius@rtems.org>
* shttpd/io_dir.c: Cast consts to size_t (Avoid overflows on implicit const casts on 16bit targets).
This commit is contained in:
@@ -1,3 +1,8 @@
|
||||
2010-04-13 Ralf Corsépius <ralf.corsepius@rtems.org>
|
||||
|
||||
* shttpd/io_dir.c: Cast consts to size_t (Avoid overflows on implicit
|
||||
const casts on 16bit targets).
|
||||
|
||||
2010-04-12 Ralf Corsépius <ralf.corsepius@rtems.org>
|
||||
|
||||
* score/include/rtems/system.h: Let RTEMS_offsetof return uintptr_t
|
||||
|
||||
@@ -79,7 +79,7 @@ read_dir(struct stream *stream, void *buf, size_t len)
|
||||
if (st.st_size < 1024)
|
||||
(void) my_snprintf(size, sizeof(size),
|
||||
"%lu", (unsigned long) st.st_size);
|
||||
else if (st.st_size < 1024 * 1024)
|
||||
else if (st.st_size < ((size_t)1024 * (size_t)1024))
|
||||
(void) my_snprintf(size, sizeof(size), "%luk",
|
||||
(unsigned long) (st.st_size >> 10) + 1);
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user