On Tuesday, April 23, 2013 22:34:30 Antonio Quartulli wrote:
@@ -1535,7 +1535,9 @@ static uint32_t batadv_tt_global_crc(struct batadv_priv *bat_priv, orig_node)) continue;
crc ^= crc32c(0, tt_common->addr, ETH_ALEN);
crc_tmp = crc32c(0, &tt_common->vid,
sizeof(tt_common->vid));
crc ^= crc32c(crc_tmp, tt_common->addr, ETH_ALEN); } rcu_read_unlock();
Is it necessary to define another variable ? Why not:
crc = crc32c(0, &tt_common->vid, sizeof(tt_common->vid)); crc ^= crc32c(crc, tt_common->addr, ETH_ALEN);
@@ -1565,7 +1567,9 @@ static uint32_t batadv_tt_local_crc(struct batadv_priv
*bat_priv)
if (tt_common->flags & BATADV_TT_CLIENT_NEW) continue;
crc ^= crc32c(0, tt_common->addr, ETH_ALEN);
crc_tmp = crc32c(0, &tt_common->vid,
sizeof(tt_common->vid));
crc ^= crc32c(crc_tmp, tt_common->addr, ETH_ALEN); }
Dito.
Cheers, Marek