Skip to content

Commit

Permalink
fix: iosli memcpy-param-overlap error
Browse files Browse the repository at this point in the history
  • Loading branch information
jean-roland committed Oct 8, 2024
1 parent 9486a46 commit a57a9f6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/protocol/iobuf.c
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ void _z_zbuf_clear(_z_zbuf_t *zbf) { _z_iosli_clear(&zbf->_ios); }
void _z_zbuf_compact(_z_zbuf_t *zbf) {
if ((zbf->_ios._r_pos != 0) || (zbf->_ios._w_pos != 0)) {
size_t len = _z_iosli_readable(&zbf->_ios);
(void)memcpy(zbf->_ios._buf, _z_zbuf_get_rptr(zbf), len);
(void)memmove(zbf->_ios._buf, _z_zbuf_get_rptr(zbf), len);
_z_zbuf_set_rpos(zbf, 0);
_z_zbuf_set_wpos(zbf, len);
}
Expand Down

0 comments on commit a57a9f6

Please sign in to comment.