Removed useless code.

This commit is contained in:
irungentoo 2014-10-02 08:31:14 -04:00
parent e6fcef4958
commit 1ac1522c39
No known key found for this signature in database
GPG Key ID: 10349DC9BED89E98
2 changed files with 0 additions and 41 deletions

View File

@ -2839,36 +2839,3 @@ uint32_t copy_friendlist(Messenger const *m, int32_t *out_list, uint32_t list_si
return ret;
}
/* Allocate and return a list of valid friend id's. List must be freed by the
* caller.
*
* retun 0 if success.
* return -1 if failure.
*/
int get_friendlist(const Messenger *m, int32_t **out_list, uint32_t *out_list_length)
{
uint32_t i;
*out_list_length = 0;
if (m->numfriends == 0) {
*out_list = NULL;
return 0;
}
*out_list = malloc(m->numfriends * sizeof(int32_t));
if (*out_list == NULL) {
return -1;
}
for (i = 0; i < m->numfriends; i++) {
if (m->friendlist[i].status > 0) {
(*out_list)[i] = i;
(*out_list_length)++;
}
}
return 0;
}

View File

@ -914,12 +914,4 @@ uint32_t get_num_online_friends(const Messenger *m);
* of out_list will be truncated to list_size. */
uint32_t copy_friendlist(const Messenger *m, int32_t *out_list, uint32_t list_size);
/* Allocate and return a list of valid friend id's. List must be freed by the
* caller.
*
* retun 0 if success.
* return -1 if failure.
*/
int get_friendlist(const Messenger *m, int **out_list, uint32_t *out_list_length);
#endif