summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorirungentoo <irungentoo@gmail.com>2015-03-13 08:36:07 -0400
committerirungentoo <irungentoo@gmail.com>2015-03-13 08:36:07 -0400
commiteec1042695378c8e7fa2dc02970c79b9caddcf3d (patch)
tree688e4832b1074b7b8137203eee3843ac2dd0fc16
parent334cb9c8db318516abd069a3cc2ec1fa233c8d9c (diff)
tox_friend_get_public_key() now does nothing when public_key is NULL.
-rw-r--r--toxcore/tox.c1
-rw-r--r--toxcore/tox.h1
2 files changed, 0 insertions, 2 deletions
diff --git a/toxcore/tox.c b/toxcore/tox.c
index 4f495977..c527ce96 100644
--- a/toxcore/tox.c
+++ b/toxcore/tox.c
@@ -546,7 +546,6 @@ bool tox_friend_get_public_key(const Tox *tox, uint32_t friend_number, uint8_t *
546 TOX_ERR_FRIEND_GET_PUBLIC_KEY *error) 546 TOX_ERR_FRIEND_GET_PUBLIC_KEY *error)
547{ 547{
548 if (!public_key) { 548 if (!public_key) {
549 SET_ERROR_PARAMETER(error, TOX_ERR_FRIEND_GET_PUBLIC_KEY_NULL);
550 return 0; 549 return 0;
551 } 550 }
552 551
diff --git a/toxcore/tox.h b/toxcore/tox.h
index 868b7a1a..d23065ff 100644
--- a/toxcore/tox.h
+++ b/toxcore/tox.h
@@ -948,7 +948,6 @@ uint32_t tox_friend_by_public_key(const Tox *tox, const uint8_t *public_key, TOX
948 948
949typedef enum TOX_ERR_FRIEND_GET_PUBLIC_KEY { 949typedef enum TOX_ERR_FRIEND_GET_PUBLIC_KEY {
950 TOX_ERR_FRIEND_GET_PUBLIC_KEY_OK, 950 TOX_ERR_FRIEND_GET_PUBLIC_KEY_OK,
951 TOX_ERR_FRIEND_GET_PUBLIC_KEY_NULL,
952 /** 951 /**
953 * No friend with the given number exists on the friend list. 952 * No friend with the given number exists on the friend list.
954 */ 953 */