diff options
author | Lubomir Rintel <lkundrak@v3.sk> | 2015-06-22 13:13:05 +0200 |
---|---|---|
committer | Lubomir Rintel <lkundrak@v3.sk> | 2015-06-22 13:13:05 +0200 |
commit | a1868dcfc3b640d3273c450d790befc8632edc3a (patch) | |
tree | 4f4de6702cf18e0c33298ebe25e1a1da56dc9964 | |
parent | 083327b830e6a9968ec917273c860d90d51f85e3 (diff) | |
download | NetworkManager-a1868dcfc3b640d3273c450d790befc8632edc3a.tar.gz |
platform: fix build on 32-bit systems
The decimal literals are signed by default and these are too large to fit in a
signed 32-bit int.
-rw-r--r-- | src/platform/nmp-object.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/platform/nmp-object.c b/src/platform/nmp-object.c index 5893ce0e31..9977e84250 100644 --- a/src/platform/nmp-object.c +++ b/src/platform/nmp-object.c @@ -674,7 +674,7 @@ _vt_cmd_plobj_id_hash (link, NMPlatformLink, { /* libnl considers: * .oo_id_attrs = LINK_ATTR_IFINDEX | LINK_ATTR_FAMILY, */ - hash = (guint) 3982791431; + hash = (guint) 3982791431u; hash = hash + ((guint) obj->ifindex); }) _vt_cmd_plobj_id_hash (ip4_address, NMPlatformIP4Address, { @@ -682,13 +682,13 @@ _vt_cmd_plobj_id_hash (ip4_address, NMPlatformIP4Address, { * .oo_id_attrs = (ADDR_ATTR_FAMILY | ADDR_ATTR_IFINDEX | * ADDR_ATTR_LOCAL | ADDR_ATTR_PREFIXLEN), */ - hash = (guint) 3591309853; + hash = (guint) 3591309853u; hash = hash + ((guint) obj->ifindex); hash = hash * 33 + ((guint) obj->plen); hash = hash * 33 + ((guint) obj->address); }) _vt_cmd_plobj_id_hash (ip6_address, NMPlatformIP6Address, { - hash = (guint) 2907861637; + hash = (guint) 2907861637u; hash = hash + ((guint) obj->ifindex); hash = hash * 33 + ((guint) obj->plen); hash = hash * 33 + _id_hash_ip6_addr (&obj->address); @@ -699,14 +699,14 @@ _vt_cmd_plobj_id_hash (ip4_route, NMPlatformIP4Route, { * ROUTE_ATTR_TABLE | ROUTE_ATTR_DST | * ROUTE_ATTR_PRIO), */ - hash = (guint) 2569857221; + hash = (guint) 2569857221u; hash = hash + ((guint) obj->ifindex); hash = hash * 33 + ((guint) obj->plen); hash = hash * 33 + ((guint) obj->metric); hash = hash * 33 + ((guint) obj->network); }) _vt_cmd_plobj_id_hash (ip6_route, NMPlatformIP6Route, { - hash = (guint) 3999787007; + hash = (guint) 3999787007u; hash = hash + ((guint) obj->ifindex); hash = hash * 33 + ((guint) obj->plen); hash = hash * 33 + ((guint) obj->metric); |