aboutsummaryrefslogtreecommitdiff
path: root/src/topology
diff options
context:
space:
mode:
authorJulius Bünger <buenger@mytum.de>2019-04-26 05:56:54 +0200
committerJulius Bünger <buenger@mytum.de>2019-04-26 05:56:54 +0200
commitf5f5a9f680df2cebe6435ec87650cb3cb6e3ef6e (patch)
tree94055d2c049a65b5ab6c61fd3c5867fe49f6f429 /src/topology
parenta097690795f4f814de7cdbc97ef95fb899eeacd3 (diff)
downloadgnunet-f5f5a9f680df2cebe6435ec87650cb3cb6e3ef6e.tar.gz
gnunet-f5f5a9f680df2cebe6435ec87650cb3cb6e3ef6e.zip
memcmp() -> GNUNET_memcmp(), first take
Diffstat (limited to 'src/topology')
-rw-r--r--src/topology/gnunet-daemon-topology.c25
1 files changed, 10 insertions, 15 deletions
diff --git a/src/topology/gnunet-daemon-topology.c b/src/topology/gnunet-daemon-topology.c
index 6c93e9845..e5734abb4 100644
--- a/src/topology/gnunet-daemon-topology.c
+++ b/src/topology/gnunet-daemon-topology.c
@@ -306,9 +306,8 @@ attempt_connect (struct Peer *pos)
306 uint32_t strength; 306 uint32_t strength;
307 307
308 if (0 == 308 if (0 ==
309 memcmp (&my_identity, 309 GNUNET_memcmp (&my_identity,
310 &pos->pid, 310 &pos->pid))
311 sizeof (struct GNUNET_PeerIdentity)))
312 return; /* This is myself, nothing to do. */ 311 return; /* This is myself, nothing to do. */
313 if (connection_count < target_connection_count) 312 if (connection_count < target_connection_count)
314 strength = 1; 313 strength = 1;
@@ -602,9 +601,8 @@ connect_notify (void *cls,
602 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, 601 GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
603 "Core told us that we are connecting to `%s'\n", 602 "Core told us that we are connecting to `%s'\n",
604 GNUNET_i2s (peer)); 603 GNUNET_i2s (peer));
605 if (0 == memcmp (&my_identity, 604 if (0 == GNUNET_memcmp (&my_identity,
606 peer, 605 peer))
607 sizeof (struct GNUNET_PeerIdentity)))
608 return NULL; 606 return NULL;
609 extra = GNUNET_CORE_get_mq_options (GNUNET_YES, 607 extra = GNUNET_CORE_get_mq_options (GNUNET_YES,
610 GNUNET_CORE_PRIO_BEST_EFFORT, 608 GNUNET_CORE_PRIO_BEST_EFFORT,
@@ -781,9 +779,8 @@ consider_for_advertising (const struct GNUNET_HELLO_Message *hello)
781 GNUNET_break (0); 779 GNUNET_break (0);
782 return; 780 return;
783 } 781 }
784 if (0 == memcmp (&pid, 782 if (0 == GNUNET_memcmp (&pid,
785 &my_identity, 783 &my_identity))
786 sizeof (struct GNUNET_PeerIdentity)))
787 return; /* that's me! */ 784 return; /* that's me! */
788 have_address = GNUNET_NO; 785 have_address = GNUNET_NO;
789 GNUNET_HELLO_iterate_addresses (hello, 786 GNUNET_HELLO_iterate_addresses (hello,
@@ -869,9 +866,8 @@ process_peer (void *cls,
869 return; 866 return;
870 } 867 }
871 GNUNET_assert (NULL != peer); 868 GNUNET_assert (NULL != peer);
872 if (0 == memcmp (&my_identity, 869 if (0 == GNUNET_memcmp (&my_identity,
873 peer, 870 peer))
874 sizeof (struct GNUNET_PeerIdentity)))
875 return; /* that's me! */ 871 return; /* that's me! */
876 if (NULL == hello) 872 if (NULL == hello)
877 { 873 {
@@ -948,9 +944,8 @@ handle_friend (void *cls,
948 unsigned int *entries_found = cls; 944 unsigned int *entries_found = cls;
949 struct Peer *fl; 945 struct Peer *fl;
950 946
951 if (0 == memcmp (pid, 947 if (0 == GNUNET_memcmp (pid,
952 &my_identity, 948 &my_identity))
953 sizeof (struct GNUNET_PeerIdentity)))
954 { 949 {
955 GNUNET_log (GNUNET_ERROR_TYPE_WARNING, 950 GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
956 _("Found myself `%s' in friend list (useless, ignored)\n"), 951 _("Found myself `%s' in friend list (useless, ignored)\n"),