diff options
author | Marc Schütz <schuetzm@gmx.net> | 2014-06-10 20:54:48 +0200 |
---|---|---|
committer | Marc Schütz <schuetzm@gmx.net> | 2014-06-10 20:54:48 +0200 |
commit | 99d594014014a37fdee9e83575a8895400c9cd60 (patch) | |
tree | 55152fcfb850511b17ae2af9c77bf30778b465d2 /toxcore/friend_requests.c | |
parent | 8bdf487d199b82db85883b613e86deeba15f9b32 (diff) |
Const correctness in various interdependent files
Diffstat (limited to 'toxcore/friend_requests.c')
-rw-r--r-- | toxcore/friend_requests.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/toxcore/friend_requests.c b/toxcore/friend_requests.c index eb2a791c..4bf95a44 100644 --- a/toxcore/friend_requests.c +++ b/toxcore/friend_requests.c | |||
@@ -72,7 +72,7 @@ uint32_t get_nospam(Friend_Requests *fr) | |||
72 | 72 | ||
73 | 73 | ||
74 | /* Set the function that will be executed when a friend request is received. */ | 74 | /* Set the function that will be executed when a friend request is received. */ |
75 | void callback_friendrequest(Friend_Requests *fr, void (*function)(void *, uint8_t *, uint8_t *, uint16_t, void *), | 75 | void callback_friendrequest(Friend_Requests *fr, void (*function)(void *, const uint8_t *, const uint8_t *, uint16_t, void *), |
76 | void *object, void *userdata) | 76 | void *object, void *userdata) |
77 | { | 77 | { |
78 | fr->handle_friendrequest = function; | 78 | fr->handle_friendrequest = function; |
@@ -81,14 +81,14 @@ void callback_friendrequest(Friend_Requests *fr, void (*function)(void *, uint8_ | |||
81 | fr->handle_friendrequest_userdata = userdata; | 81 | fr->handle_friendrequest_userdata = userdata; |
82 | } | 82 | } |
83 | /* Set the function used to check if a friend request should be displayed to the user or not. */ | 83 | /* Set the function used to check if a friend request should be displayed to the user or not. */ |
84 | void set_filter_function(Friend_Requests *fr, int (*function)(uint8_t *, void *), void *userdata) | 84 | void set_filter_function(Friend_Requests *fr, int (*function)(const uint8_t *, void *), void *userdata) |
85 | { | 85 | { |
86 | fr->filter_function = function; | 86 | fr->filter_function = function; |
87 | fr->filter_function_userdata = userdata; | 87 | fr->filter_function_userdata = userdata; |
88 | } | 88 | } |
89 | 89 | ||
90 | /* Add to list of received friend requests. */ | 90 | /* Add to list of received friend requests. */ |
91 | static void addto_receivedlist(Friend_Requests *fr, uint8_t *client_id) | 91 | static void addto_receivedlist(Friend_Requests *fr, const uint8_t *client_id) |
92 | { | 92 | { |
93 | if (fr->received_requests_index >= MAX_RECEIVED_STORED) | 93 | if (fr->received_requests_index >= MAX_RECEIVED_STORED) |
94 | fr->received_requests_index = 0; | 94 | fr->received_requests_index = 0; |
@@ -102,7 +102,7 @@ static void addto_receivedlist(Friend_Requests *fr, uint8_t *client_id) | |||
102 | * return 0 if it did not. | 102 | * return 0 if it did not. |
103 | * return 1 if it did. | 103 | * return 1 if it did. |
104 | */ | 104 | */ |
105 | static int request_received(Friend_Requests *fr, uint8_t *client_id) | 105 | static int request_received(Friend_Requests *fr, const uint8_t *client_id) |
106 | { | 106 | { |
107 | uint32_t i; | 107 | uint32_t i; |
108 | 108 | ||
@@ -133,7 +133,7 @@ int remove_request_received(Friend_Requests *fr, uint8_t *client_id) | |||
133 | } | 133 | } |
134 | 134 | ||
135 | 135 | ||
136 | static int friendreq_handlepacket(void *object, uint8_t *source_pubkey, uint8_t *packet, uint32_t length) | 136 | static int friendreq_handlepacket(void *object, const uint8_t *source_pubkey, const uint8_t *packet, uint32_t length) |
137 | { | 137 | { |
138 | Friend_Requests *fr = object; | 138 | Friend_Requests *fr = object; |
139 | 139 | ||