From 4cad3cfe88e71ee61ca0d0ea780741cdb86e8416 Mon Sep 17 00:00:00 2001 From: Thomas Haller Date: Thu, 5 Nov 2020 15:15:21 +0100 Subject: [PATCH] core/ovs: fix using unsigned "mtu" value to json_pack() Of course, in practice "mtu" is much smaller than 2^31, and also is sizeof(int) >= sizeof(uint32_t) (on our systems). Hence, this was correct. Still, it feels ugly to pass a unsigned integer where not the entire range is covered. --- src/devices/ovs/nm-ovsdb.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/devices/ovs/nm-ovsdb.c b/src/devices/ovs/nm-ovsdb.c index b52cf0b645..2044f3629f 100644 --- a/src/devices/ovs/nm-ovsdb.c +++ b/src/devices/ovs/nm-ovsdb.c @@ -1056,14 +1056,14 @@ ovsdb_next_command(NMOvsdb *self) json_array_append_new(params, _inc_next_cfg(priv->db_uuid)); json_array_append_new(params, - json_pack("{s:s, s:s, s:{s: i}, s:[[s, s, s]]}", + json_pack("{s:s, s:s, s:{s: I}, s:[[s, s, s]]}", "op", "update", "table", "Interface", "row", "mtu_request", - call->mtu, + (json_int_t) call->mtu, "where", "name", "==",