Lennart said:
> We have these nice USEC_PER_MSEC-style macro definitions which make it a
> little bit clearer what we are converting here from what into
> what... please use that instead of writing "1000"...
>
> (we stole those from gstreamer btw)
- r = sd_rtnl_message_append_u32(m, IFLA_BOND_MIIMON, b->miimon / 1000);
+ r = sd_rtnl_message_append_u32(m, IFLA_BOND_MIIMON, b->miimon / USEC_PER_MSEC);
if (r < 0) {
log_error_netdev(netdev,
"Could not append IFLA_BOND_BOND_MIIMON attribute: %s",
if (r < 0) {
log_error_netdev(netdev,
"Could not append IFLA_BOND_BOND_MIIMON attribute: %s",
}
if (b->downdelay != 0) {
}
if (b->downdelay != 0) {
- r = sd_rtnl_message_append_u32(m, IFLA_BOND_DOWNDELAY, b->downdelay / 1000);
+ r = sd_rtnl_message_append_u32(m, IFLA_BOND_DOWNDELAY, b->downdelay / USEC_PER_MSEC);
if (r < 0) {
log_error_netdev(netdev,
"Could not append IFLA_BOND_DOWNDELAY attribute: %s",
if (r < 0) {
log_error_netdev(netdev,
"Could not append IFLA_BOND_DOWNDELAY attribute: %s",
- r = sd_rtnl_message_append_u32(m, IFLA_BOND_UPDELAY, b->updelay / 1000);
+ r = sd_rtnl_message_append_u32(m, IFLA_BOND_UPDELAY, b->updelay / USEC_PER_MSEC);
if (r < 0) {
log_error_netdev(netdev,
"Could not append IFLA_BOND_UPDELAY attribute: %s",
if (r < 0) {
log_error_netdev(netdev,
"Could not append IFLA_BOND_UPDELAY attribute: %s",