File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2222#include < fs/memdisk.hpp>
2323#include < statman>
2424
25- #define likely (x ) __builtin_expect(!!(x), 1 )
26- #define unlikely (x ) __builtin_expect(!!(x), 0 )
27-
2825extern " C" {
2926 char _DISK_START_;
3027 char _DISK_END_;
@@ -47,7 +44,7 @@ namespace fs {
4744
4845 auto sector_loc = image_start_ + blk * block_size ();
4946 // Disallow reading memory past disk image
50- if (unlikely (sector_loc >= image_end_))
47+ if (UNLIKELY (sector_loc >= image_end_))
5148 return buffer_t {};
5249
5350 auto buffer = new uint8_t [block_size ()];
@@ -64,7 +61,7 @@ namespace fs {
6461 auto end_loc = start_loc + cnt * block_size ();
6562
6663 // Disallow reading memory past disk image
67- if (unlikely (end_loc >= image_end_))
64+ if (UNLIKELY (end_loc >= image_end_))
6865 return buffer_t {};
6966
7067 auto buffer = new uint8_t [cnt * block_size ()];
You can’t perform that action at this time.
0 commit comments