summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2020-11-05 15:15:21 +0100
committerThomas Haller <thaller@redhat.com>2020-11-09 17:53:16 +0100
commit4cad3cfe88e71ee61ca0d0ea780741cdb86e8416 (patch)
treecab4f00c3f0ef391e4919d7af2d370d6df9eb10f
parente05edcfd7ed5c2f396fc2bace4144b140bd285dc (diff)
downloadNetworkManager-4cad3cfe88e71ee61ca0d0ea780741cdb86e8416.tar.gz
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.
-rw-r--r--src/devices/ovs/nm-ovsdb.c4
1 files 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",
"==",