if (&e->list_node != list_front(&slave->entries)) {
ds_put_cstr(&ds, " + ");
}
- ds_put_format(&ds, "h%td: %"PRIu64"kB",
+ ds_put_format(&ds, "h%"PRIdPTR": %"PRIu64"kB",
e - bond->hash, e->tx_bytes / 1024);
}
ds_put_cstr(&ds, ")");
struct bond *bond = from->bond;
uint64_t delta = hash->tx_bytes;
- VLOG_INFO("bond %s: shift %"PRIu64"kB of load (with hash %td) "
+ VLOG_INFO("bond %s: shift %"PRIu64"kB of load (with hash %"PRIdPTR") "
"from %s to %s (now carrying %"PRIu64"kB and "
"%"PRIu64"kB load, respectively)",
bond->name, delta / 1024, hash - bond->hash,
uint32_t basis;
if (vlan_s) {
- if (sscanf(vlan_s, "%u", &vlan) != 1) {
+ if (!ovs_scan(vlan_s, "%u", &vlan)) {
unixctl_command_reply_error(conn, "invalid vlan");
return;
}
}
if (basis_s) {
- if (sscanf(basis_s, "%"PRIu32, &basis) != 1) {
+ if (!ovs_scan(basis_s, "%"SCNu32, &basis)) {
unixctl_command_reply_error(conn, "invalid basis");
return;
}
basis = 0;
}
- if (sscanf(mac_s, ETH_ADDR_SCAN_FMT, ETH_ADDR_SCAN_ARGS(mac))
- == ETH_ADDR_SCAN_COUNT) {
+ if (ovs_scan(mac_s, ETH_ADDR_SCAN_FMT, ETH_ADDR_SCAN_ARGS(mac))) {
hash = bond_hash_src(mac, vlan, basis) & BOND_MASK;
hash_cstr = xasprintf("%u", hash);