summaryrefslogtreecommitdiff
path: root/toxcore/tox.c
diff options
context:
space:
mode:
Diffstat (limited to 'toxcore/tox.c')
-rw-r--r--toxcore/tox.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/toxcore/tox.c b/toxcore/tox.c
index 203a6550..558fe28a 100644
--- a/toxcore/tox.c
+++ b/toxcore/tox.c
@@ -1013,7 +1013,7 @@ bool tox_friend_get_status_message(const Tox *tox, uint32_t friend_number, uint8
1013{ 1013{
1014 if (!status_message) { 1014 if (!status_message) {
1015 SET_ERROR_PARAMETER(error, TOX_ERR_FRIEND_QUERY_NULL); 1015 SET_ERROR_PARAMETER(error, TOX_ERR_FRIEND_QUERY_NULL);
1016 return 0; 1016 return false;
1017 } 1017 }
1018 1018
1019 const Messenger *const m = tox->m; 1019 const Messenger *const m = tox->m;
@@ -1021,14 +1021,14 @@ bool tox_friend_get_status_message(const Tox *tox, uint32_t friend_number, uint8
1021 1021
1022 if (size == -1) { 1022 if (size == -1) {
1023 SET_ERROR_PARAMETER(error, TOX_ERR_FRIEND_QUERY_FRIEND_NOT_FOUND); 1023 SET_ERROR_PARAMETER(error, TOX_ERR_FRIEND_QUERY_FRIEND_NOT_FOUND);
1024 return 0; 1024 return false;
1025 } 1025 }
1026 1026
1027 const int ret = m_copy_statusmessage(m, friend_number, status_message, size); 1027 const int ret = m_copy_statusmessage(m, friend_number, status_message, size);
1028 assert(ret == size && "concurrency problem: friend status message changed"); 1028 assert(ret == size && "concurrency problem: friend status message changed");
1029 1029
1030 SET_ERROR_PARAMETER(error, TOX_ERR_FRIEND_QUERY_OK); 1030 SET_ERROR_PARAMETER(error, TOX_ERR_FRIEND_QUERY_OK);
1031 return 1; 1031 return ret == size;
1032} 1032}
1033 1033
1034void tox_callback_friend_status_message(Tox *tox, tox_friend_status_message_cb *callback) 1034void tox_callback_friend_status_message(Tox *tox, tox_friend_status_message_cb *callback)