1
0
Fork 0
mirror of https://git.rwth-aachen.de/acs/public/villas/node/ synced 2025-03-09 00:00:00 +01:00

lib/ips/fifo: use std:min in favor of old macro

This commit is contained in:
daniel-k 2018-01-10 15:45:24 +01:00
parent 44e78643ea
commit 687f1e5bba

View file

@ -108,7 +108,7 @@ size_t Fifo::write(const void *buf, size_t len)
size_t Fifo::read(void *buf, size_t len)
{
size_t nextlen = 0;
uint32_t rxlen;
size_t rxlen;
auto intc = reinterpret_cast<InterruptController*>(dependencies["intc"]);
@ -119,7 +119,7 @@ size_t Fifo::read(void *buf, size_t len)
/* Get length of next frame */
rxlen = XLlFifo_RxGetLen(&xFifo);
nextlen = MIN(rxlen, len);
nextlen = std::min(rxlen, len);
/* Read from FIFO */
XLlFifo_Read(&xFifo, buf, nextlen);