summaryrefslogtreecommitdiffstats
path: root/server/RouteController.cpp
diff options
context:
space:
mode:
authorSreeram Ramachandran <sreeram@google.com>2014-07-01 15:06:05 -0700
committerSreeram Ramachandran <sreeram@google.com>2014-07-01 15:09:14 -0700
commit1201e84ebda52d8d82e5385644e9de0923e61aa3 (patch)
tree2a43407d734cc2d1a959ca0c9f3b96adcd74252f /server/RouteController.cpp
parentb1425cc09f8a29350520db0d4f489331df5a689b (diff)
downloadplatform_system_netd-1201e84ebda52d8d82e5385644e9de0923e61aa3.tar.gz
platform_system_netd-1201e84ebda52d8d82e5385644e9de0923e61aa3.tar.bz2
platform_system_netd-1201e84ebda52d8d82e5385644e9de0923e61aa3.zip
Use %zu to printf size_t correctly on both 32-bit and 64-bit platforms.
Change-Id: I5223e574084fca47606b844d74a99a642c7d66be
Diffstat (limited to 'server/RouteController.cpp')
-rw-r--r--server/RouteController.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/server/RouteController.cpp b/server/RouteController.cpp
index 30bdae863..411447ef6 100644
--- a/server/RouteController.cpp
+++ b/server/RouteController.cpp
@@ -140,7 +140,7 @@ WARN_UNUSED_RESULT int sendNetlinkRequest(uint16_t action, uint16_t flags, iovec
ALOGE("netlink response contains error (%s)", strerror(-ret));
}
} else {
- ALOGE("bad netlink response message size (%d != %u)", ret, sizeof(response));
+ ALOGE("bad netlink response message size (%d != %zu)", ret, sizeof(response));
ret = -EBADMSG;
}
} else {
@@ -181,7 +181,7 @@ WARN_UNUSED_RESULT int modifyIpRule(uint16_t action, uint32_t priority, uint32_t
if (interface) {
interfaceLength = strlcpy(oifname, interface, IFNAMSIZ) + 1;
if (interfaceLength > IFNAMSIZ) {
- ALOGE("interface name too long (%u > %u)", interfaceLength, IFNAMSIZ);
+ ALOGE("interface name too long (%zu > %zu)", interfaceLength, IFNAMSIZ);
return -ENAMETOOLONG;
}
paddingLength = RTA_SPACE(interfaceLength) - RTA_LENGTH(interfaceLength);
@@ -189,7 +189,7 @@ WARN_UNUSED_RESULT int modifyIpRule(uint16_t action, uint32_t priority, uint32_t
// Either both start and end UID must be specified, or neither.
if ((uidStart == INVALID_UID) != (uidEnd == INVALID_UID)) {
- ALOGE("incompatible start and end UIDs (%u vs %u)", uidStart, uidEnd);
+ ALOGE("incompatible start and end UIDs (%zu vs %zu)", uidStart, uidEnd);
return -EUSERS;
}
bool isUidRule = (uidStart != INVALID_UID);
@@ -254,7 +254,7 @@ WARN_UNUSED_RESULT int modifyIpRoute(uint16_t action, uint32_t table, const char
}
if (static_cast<size_t>(rawLength) > sizeof(rawAddress)) {
- ALOGE("impossible! address too long (%d vs %u)", rawLength, sizeof(rawAddress));
+ ALOGE("impossible! address too long (%d vs %zu)", rawLength, sizeof(rawAddress));
return -ENOBUFS; // Cannot happen; parsePrefix only supports IPv4 and IPv6.
}