aboutsummaryrefslogtreecommitdiff
path: root/src/dht/gnunet-service-dht_neighbours.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2022-02-01 09:31:19 +0100
committerChristian Grothoff <christian@grothoff.org>2022-02-19 12:43:32 +0100
commit5b4ac38b55682277269bfe54324c15a6af1bb118 (patch)
tree3b7e7a1093c3a6890e250bfa9d2b4d35f65f1155 /src/dht/gnunet-service-dht_neighbours.c
parent5e041b56a98c49a944804420ad53e18707c9f823 (diff)
downloadgnunet-5b4ac38b55682277269bfe54324c15a6af1bb118.tar.gz
gnunet-5b4ac38b55682277269bfe54324c15a6af1bb118.zip
-try to make static analysis happy
Diffstat (limited to 'src/dht/gnunet-service-dht_neighbours.c')
-rw-r--r--src/dht/gnunet-service-dht_neighbours.c26
1 files changed, 20 insertions, 6 deletions
diff --git a/src/dht/gnunet-service-dht_neighbours.c b/src/dht/gnunet-service-dht_neighbours.c
index e4d9ec8ea..68d431d17 100644
--- a/src/dht/gnunet-service-dht_neighbours.c
+++ b/src/dht/gnunet-service-dht_neighbours.c
@@ -1610,12 +1610,26 @@ GDS_NEIGHBOURS_handle_reply (struct PeerInfo *pi,
1610 prm->expiration_time = GNUNET_TIME_absolute_hton (bd->expiration_time); 1610 prm->expiration_time = GNUNET_TIME_absolute_hton (bd->expiration_time);
1611 prm->key = *query_hash; 1611 prm->key = *query_hash;
1612 paths = (struct GNUNET_DHT_PathElement *) &prm[1]; 1612 paths = (struct GNUNET_DHT_PathElement *) &prm[1];
1613 GNUNET_memcpy (paths, 1613 if (NULL != bd->put_path)
1614 bd->put_path, 1614 {
1615 ppl * sizeof(struct GNUNET_DHT_PathElement)); 1615 GNUNET_memcpy (paths,
1616 GNUNET_memcpy (&paths[ppl], 1616 bd->put_path,
1617 get_path, 1617 ppl * sizeof(struct GNUNET_DHT_PathElement));
1618 get_path_length * sizeof(struct GNUNET_DHT_PathElement)); 1618 }
1619 else
1620 {
1621 GNUNET_assert (0 == ppl);
1622 }
1623 if (NULL != get_path)
1624 {
1625 GNUNET_memcpy (&paths[ppl],
1626 get_path,
1627 get_path_length * sizeof(struct GNUNET_DHT_PathElement));
1628 }
1629 else
1630 {
1631 GNUNET_assert (0 == get_path_length);
1632 }
1619 /* 0 == get_path_length means path is not being tracked */ 1633 /* 0 == get_path_length means path is not being tracked */
1620 if (0 != get_path_length) 1634 if (0 != get_path_length)
1621 { 1635 {