diff options
author | irungentoo <irungentoo@gmail.com> | 2014-06-15 10:29:13 -0400 |
---|---|---|
committer | irungentoo <irungentoo@gmail.com> | 2014-06-15 10:29:13 -0400 |
commit | a38d962b040e06ebe986e59e4c53843dc5fbbfab (patch) | |
tree | 487e6892ca1b10444b98d128bddd18282c17a86b /toxcore/friend_requests.c | |
parent | 1a3d45f83dd935360036fb71530c16a06a028834 (diff) | |
parent | 4940c4c62b6014d1f0586aa6aca7bf6e4ecfcf29 (diff) |
Merge branch 'const_correctness' of https://github.com/schuetzm/ProjectTox-Core into schuetzm-const_correctness
Diffstat (limited to 'toxcore/friend_requests.c')
-rw-r--r-- | toxcore/friend_requests.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/toxcore/friend_requests.c b/toxcore/friend_requests.c index 9b05cc51..8366a8cb 100644 --- a/toxcore/friend_requests.c +++ b/toxcore/friend_requests.c | |||
@@ -35,7 +35,7 @@ | |||
35 | * return 0 if it sent the friend request directly to the friend. | 35 | * return 0 if it sent the friend request directly to the friend. |
36 | * return the number of peers it was routed through if it did not send it directly. | 36 | * return the number of peers it was routed through if it did not send it directly. |
37 | */ | 37 | */ |
38 | int send_friendrequest(Onion_Client *onion_c, uint8_t *public_key, uint32_t nospam_num, uint8_t *data, uint32_t length) | 38 | int send_friendrequest(const Onion_Client *onion_c, const uint8_t *public_key, uint32_t nospam_num, const uint8_t *data, uint32_t length) |
39 | { | 39 | { |
40 | if (1 + sizeof(nospam_num) + length > ONION_CLIENT_MAX_DATA_SIZE || length == 0) | 40 | if (1 + sizeof(nospam_num) + length > ONION_CLIENT_MAX_DATA_SIZE || length == 0) |
41 | return -1; | 41 | return -1; |
@@ -65,7 +65,7 @@ void set_nospam(Friend_Requests *fr, uint32_t num) | |||
65 | fr->nospam = num; | 65 | fr->nospam = num; |
66 | } | 66 | } |
67 | 67 | ||
68 | uint32_t get_nospam(Friend_Requests *fr) | 68 | uint32_t get_nospam(const Friend_Requests *fr) |
69 | { | 69 | { |
70 | return fr->nospam; | 70 | return fr->nospam; |
71 | } | 71 | } |
@@ -118,7 +118,7 @@ static int request_received(Friend_Requests *fr, const uint8_t *client_id) | |||
118 | * return 0 if it removed it successfully. | 118 | * return 0 if it removed it successfully. |
119 | * return -1 if it didn't find it. | 119 | * return -1 if it didn't find it. |
120 | */ | 120 | */ |
121 | int remove_request_received(Friend_Requests *fr, uint8_t *client_id) | 121 | int remove_request_received(Friend_Requests *fr, const uint8_t *client_id) |
122 | { | 122 | { |
123 | uint32_t i; | 123 | uint32_t i; |
124 | 124 | ||