mirror of
https://github.com/JorjBauer/aiie.git
synced 2024-12-22 14:30:34 +00:00
better typecasting
This commit is contained in:
parent
f5b7f19ebb
commit
7f65cfb64d
@ -21,14 +21,14 @@ LRingBuffer::~LRingBuffer()
|
||||
bool LRingBuffer::Serialize(int8_t fd)
|
||||
{
|
||||
uint8_t buf[9] = { RINGBUFFERMAGIC,
|
||||
(max >> 8) & 0xFF,
|
||||
(max ) & 0xFF,
|
||||
(ptr >> 8) & 0xFF,
|
||||
(ptr ) & 0xFF,
|
||||
(fill >> 8) & 0xFF,
|
||||
(fill ) & 0xFF,
|
||||
(cursor >> 8) & 0xFF,
|
||||
(cursor ) & 0xFF };
|
||||
(uint8_t)((max >> 8) & 0xFF),
|
||||
(uint8_t)((max ) & 0xFF),
|
||||
(uint8_t)((ptr >> 8) & 0xFF),
|
||||
(uint8_t)((ptr ) & 0xFF),
|
||||
(uint8_t)((fill >> 8) & 0xFF),
|
||||
(uint8_t)((fill ) & 0xFF),
|
||||
(uint8_t)((cursor >> 8) & 0xFF),
|
||||
(uint8_t)((cursor ) & 0xFF) };
|
||||
if (g_filemanager->write(fd, buf, 9) != 9)
|
||||
return false;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user