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.
This commit is contained in:
Thomas Haller 2020-11-05 15:15:21 +01:00
parent e05edcfd7e
commit 4cad3cfe88
No known key found for this signature in database
GPG key ID: 29C2366E4DFC5728

View file

@ -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",
"==",