There were two places where we did the same calculation manually. Signed-off-by: Derek Foreman <der...@osg.samsung.com> --- src/connection.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/connection.c b/src/connection.c index 2bfdd82..bd66e94 100644 --- a/src/connection.c +++ b/src/connection.c @@ -178,7 +178,7 @@ close_fds(struct wl_buffer *buffer, int max) int32_t fds[sizeof(buffer->data) / sizeof(int32_t)], i, count; size_t size; - size = buffer->head - buffer->tail; + size = wl_buffer_size(buffer); if (size == 0) return; @@ -228,7 +228,7 @@ build_cmsg(struct wl_buffer *buffer, char *data, int *clen) struct cmsghdr *cmsg; size_t size; - size = buffer->head - buffer->tail; + size = wl_buffer_size(buffer); if (size > MAX_FDS_OUT * sizeof(int32_t)) size = MAX_FDS_OUT * sizeof(int32_t); -- 2.11.0 _______________________________________________ wayland-devel mailing list wayland-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/wayland-devel