diff options
author | Julius Bünger <buenger@mytum.de> | 2019-04-26 05:56:54 +0200 |
---|---|---|
committer | Julius Bünger <buenger@mytum.de> | 2019-04-26 05:56:54 +0200 |
commit | f5f5a9f680df2cebe6435ec87650cb3cb6e3ef6e (patch) | |
tree | 94055d2c049a65b5ab6c61fd3c5867fe49f6f429 /src/hello | |
parent | a097690795f4f814de7cdbc97ef95fb899eeacd3 (diff) | |
download | gnunet-f5f5a9f680df2cebe6435ec87650cb3cb6e3ef6e.tar.gz gnunet-f5f5a9f680df2cebe6435ec87650cb3cb6e3ef6e.zip |
memcmp() -> GNUNET_memcmp(), first take
Diffstat (limited to 'src/hello')
-rw-r--r-- | src/hello/hello.c | 5 | ||||
-rw-r--r-- | src/hello/test_hello.c | 5 |
2 files changed, 4 insertions, 6 deletions
diff --git a/src/hello/hello.c b/src/hello/hello.c index 218d73127..f803f4370 100644 --- a/src/hello/hello.c +++ b/src/hello/hello.c | |||
@@ -838,9 +838,8 @@ GNUNET_HELLO_equals (const struct GNUNET_HELLO_Message *h1, | |||
838 | if (h1->header.type != h2->header.type) | 838 | if (h1->header.type != h2->header.type) |
839 | return GNUNET_TIME_UNIT_ZERO_ABS; | 839 | return GNUNET_TIME_UNIT_ZERO_ABS; |
840 | if (0 != | 840 | if (0 != |
841 | memcmp (&h1->publicKey, | 841 | GNUNET_memcmp (&h1->publicKey, |
842 | &h2->publicKey, | 842 | &h2->publicKey)) |
843 | sizeof (struct GNUNET_CRYPTO_EddsaPublicKey))) | ||
844 | return GNUNET_TIME_UNIT_ZERO_ABS; | 843 | return GNUNET_TIME_UNIT_ZERO_ABS; |
845 | ec.expiration_limit = now; | 844 | ec.expiration_limit = now; |
846 | ec.result = GNUNET_TIME_UNIT_FOREVER_ABS; | 845 | ec.result = GNUNET_TIME_UNIT_FOREVER_ABS; |
diff --git a/src/hello/test_hello.c b/src/hello/test_hello.c index 4d8988c50..1f9c398fa 100644 --- a/src/hello/test_hello.c +++ b/src/hello/test_hello.c | |||
@@ -179,9 +179,8 @@ main (int argc, | |||
179 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 179 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |
180 | "Testing get_key from HELLO...\n"); | 180 | "Testing get_key from HELLO...\n"); |
181 | GNUNET_assert (GNUNET_OK == GNUNET_HELLO_get_id (msg2, &pid)); | 181 | GNUNET_assert (GNUNET_OK == GNUNET_HELLO_get_id (msg2, &pid)); |
182 | GNUNET_assert (0 == memcmp (&publicKey, | 182 | GNUNET_assert (0 == GNUNET_memcmp (&publicKey, |
183 | &pid.public_key, | 183 | &pid.public_key)); |
184 | sizeof (struct GNUNET_CRYPTO_EddsaPublicKey))); | ||
185 | GNUNET_free (msg1); | 184 | GNUNET_free (msg1); |
186 | 185 | ||
187 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, | 186 | GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, |