Commit b650d5f4b1cd3f9f8c4fdb319838c5c1e0695e41 ("Lift max ram slots limit in libvhost-user") renamed this constant. Use the array size instead of hard-coding a particular constant in the error message.
Signed-off-by: Stefan Hajnoczi <stefa...@redhat.com> --- util/vhost-user-server.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/util/vhost-user-server.c b/util/vhost-user-server.c index 393beeb6b9..e94a8d8a83 100644 --- a/util/vhost-user-server.c +++ b/util/vhost-user-server.c @@ -137,9 +137,9 @@ vu_message_read(VuDev *vu_dev, int conn_fd, VhostUserMsg *vmsg) read_bytes += rc; if (nfds_t > 0) { if (nfds + nfds_t > G_N_ELEMENTS(vmsg->fds)) { - error_report("A maximum of %d fds are allowed, " + error_report("A maximum of %zu fds are allowed, " "however got %lu fds now", - VHOST_MEMORY_MAX_NREGIONS, nfds + nfds_t); + G_N_ELEMENTS(vmsg->fds), nfds + nfds_t); goto fail; } memcpy(vmsg->fds + nfds, fds_t, -- 2.26.2