mirror of
https://github.com/servalproject/serval-dna.git
synced 2025-01-31 16:35:27 +00:00
Replace bcmp() with memcmp()
This commit is contained in:
parent
18eb83ebf4
commit
7a3385112a
@ -1283,10 +1283,10 @@ int overlay_route_node_info(overlay_mdp_frame *mdp,
|
|||||||
if (keyring->contexts[cn]->identities[in]->keypairs[kp]->type
|
if (keyring->contexts[cn]->identities[in]->keypairs[kp]->type
|
||||||
==KEYTYPE_CRYPTOBOX)
|
==KEYTYPE_CRYPTOBOX)
|
||||||
{
|
{
|
||||||
if (!bcmp(&mdp->nodeinfo.sid[0],
|
if (!memcmp(&mdp->nodeinfo.sid[0],
|
||||||
&keyring->contexts[cn]->identities[in]
|
&keyring->contexts[cn]->identities[in]
|
||||||
->keypairs[kp]->public_key[0],
|
->keypairs[kp]->public_key[0],
|
||||||
mdp->nodeinfo.sid_prefix_length/2))
|
mdp->nodeinfo.sid_prefix_length/2))
|
||||||
{
|
{
|
||||||
if (mdp->nodeinfo.count==mdp->nodeinfo.index)
|
if (mdp->nodeinfo.count==mdp->nodeinfo.index)
|
||||||
{
|
{
|
||||||
@ -1327,9 +1327,9 @@ int overlay_route_node_info(overlay_mdp_frame *mdp,
|
|||||||
for(n=0;n<overlay_neighbour_count;n++)
|
for(n=0;n<overlay_neighbour_count;n++)
|
||||||
if (overlay_neighbours[n].node)
|
if (overlay_neighbours[n].node)
|
||||||
{
|
{
|
||||||
if (!bcmp(&mdp->nodeinfo.sid[0],
|
if (!memcmp(&mdp->nodeinfo.sid[0],
|
||||||
&overlay_neighbours[n].node->sid[0],
|
&overlay_neighbours[n].node->sid[0],
|
||||||
mdp->nodeinfo.sid_prefix_length/2))
|
mdp->nodeinfo.sid_prefix_length/2))
|
||||||
{
|
{
|
||||||
if (mdp->nodeinfo.count==mdp->nodeinfo.index)
|
if (mdp->nodeinfo.count==mdp->nodeinfo.index)
|
||||||
{
|
{
|
||||||
@ -1362,9 +1362,9 @@ int overlay_route_node_info(overlay_mdp_frame *mdp,
|
|||||||
{
|
{
|
||||||
if (!overlay_nodes[bin][slot].sid[0]) continue;
|
if (!overlay_nodes[bin][slot].sid[0]) continue;
|
||||||
|
|
||||||
if (!bcmp(&mdp->nodeinfo.sid[0],
|
if (!memcmp(&mdp->nodeinfo.sid[0],
|
||||||
&overlay_nodes[bin][slot].sid[0],
|
&overlay_nodes[bin][slot].sid[0],
|
||||||
mdp->nodeinfo.sid_prefix_length/2))
|
mdp->nodeinfo.sid_prefix_length/2))
|
||||||
{
|
{
|
||||||
if (mdp->nodeinfo.count==mdp->nodeinfo.index)
|
if (mdp->nodeinfo.count==mdp->nodeinfo.index)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user