mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-07 01:33:56 -06:00
util/fifo8: Rename fifo8_pop_buf() -> fifo8_pop_bufptr()
Since fifo8_pop_buf() return a const buffer (which points directly into the FIFO backing store). Rename it using the 'bufptr' suffix to better reflect that it is a pointer to the internal buffer that is being returned. This will help differentiate with methods *copying* the FIFO data. Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Pierrick Bouvier <pierrick.bouvier@linaro.org> Reviewed-by: Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk> Message-Id: <20240722160745.67904-6-philmd@linaro.org>
This commit is contained in:
parent
06a16e7ba9
commit
06252bf512
8 changed files with 15 additions and 16 deletions
|
@ -208,7 +208,7 @@ static uint32_t esp_fifo8_pop_buf(Fifo8 *fifo, uint8_t *dest, int maxlen)
|
|||
}
|
||||
|
||||
len = maxlen;
|
||||
buf = fifo8_pop_buf(fifo, len, &n);
|
||||
buf = fifo8_pop_bufptr(fifo, len, &n);
|
||||
if (dest) {
|
||||
memcpy(dest, buf, n);
|
||||
}
|
||||
|
@ -217,7 +217,7 @@ static uint32_t esp_fifo8_pop_buf(Fifo8 *fifo, uint8_t *dest, int maxlen)
|
|||
len -= n;
|
||||
len = MIN(len, fifo8_num_used(fifo));
|
||||
if (len) {
|
||||
buf = fifo8_pop_buf(fifo, len, &n2);
|
||||
buf = fifo8_pop_bufptr(fifo, len, &n2);
|
||||
if (dest) {
|
||||
memcpy(&dest[n], buf, n2);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue