diff --git a/mesh/crypto.c b/mesh/crypto.c
index 136e695..a9d6704 100644
--- a/mesh/crypto.c
+++ b/mesh/crypto.c
if (result) {
ssize_t len = l_checksum_get_digest(checksum, res, 16);
- result = !!(len == 16);
+ result = (len == 16);
}
l_checksum_free(checksum);
diff --git a/mesh/friend.c b/mesh/friend.c
index 6aacf63..1c60705 100644
--- a/mesh/friend.c
+++ b/mesh/friend.c
frnd->u.active.seq = seq;
frnd->u.active.last = !seq;
- md = !!(l_queue_length(frnd->pkt_cache) > 1);
+ md = (l_queue_length(frnd->pkt_cache) > 1);
if (pkt->ctl) {
/* Make sure we don't change the bit-sense of MD,
diff --git a/mesh/mesh-io-mgmt.c b/mesh/mesh-io-mgmt.c
index 0d32859..4ca7ff9 100644
--- a/mesh/mesh-io-mgmt.c
+++ b/mesh/mesh-io-mgmt.c
count = 1;
}
- tx->delete = !!(count == 1);
+ tx->delete = (count == 1);
send_pkt(pvt, tx, ms);
diff --git a/mesh/mesh-io-unit.c b/mesh/mesh-io-unit.c
index 4fd72bf..936f5a9 100644
--- a/mesh/mesh-io-unit.c
+++ b/mesh/mesh-io-unit.c
count = 1;
}
- tx->delete = !!(count == 1);
+ tx->delete = (count == 1);
send_pkt(pvt, tx, ms);
diff --git a/mesh/net.c b/mesh/net.c
index ccfaaf2..d11de58 100644
--- a/mesh/net.c
+++ b/mesh/net.c
struct mesh_net *net = b;
net_key_beacon_refresh(subnet->net_key_tx, net->iv_index,
- !!(subnet->kr_phase == KEY_REFRESH_PHASE_TWO), net->iv_update,
+ subnet->kr_phase == KEY_REFRESH_PHASE_TWO, net->iv_update,
false);
}
/* Get IVU and KR boolean bits from beacon */
ivu = beacon_data->ivu;
kr = beacon_data->kr;
- local_kr = !!(subnet->kr_phase == KEY_REFRESH_PHASE_TWO);
+ local_kr = (subnet->kr_phase == KEY_REFRESH_PHASE_TWO);
/* We have officially *seen* this beacon now */
beacon_data->processed = true;
if (updated)
net_key_beacon_refresh(beacon_data->net_key_id,
net->iv_index,
- !!(subnet->kr_phase == KEY_REFRESH_PHASE_TWO),
+ subnet->kr_phase == KEY_REFRESH_PHASE_TWO,
net->iv_update, false);
}
}
subnet->kr_phase = phase;
net_key_beacon_refresh(subnet->net_key_tx, net->iv_index,
- !!(subnet->kr_phase == KEY_REFRESH_PHASE_TWO), net->iv_update,
+ subnet->kr_phase == KEY_REFRESH_PHASE_TWO, net->iv_update,
false);