
On Tue, Oct 14, 2025 at 08:31:45 +0200, Michal Privoznik via Devel wrote:
From: Michal Privoznik <mprivozn@redhat.com>
Wireshark offers val_to_str() function which converts numeric value to string by looking up value ('val') in an array ('vs') of <val, string> pairs. If no corresponding string is found, then the value is formatted using given 'fmt' string.
Starting from wireshark-4.6.0 not only this function gained another argument but also returns a strdup()-ed string. To keep our code simple, let's introduce a wrapper so which can be then adjusted as needed.
Signed-off-by: Michal Privoznik <mprivozn@redhat.com> --- tools/wireshark/src/packet-libvirt.c | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-)
Reviewed-by: Peter Krempa <pkrempa@redhat.com>