From 1ac1522c39a1bd49aeef0be3d339f1740fffb663 Mon Sep 17 00:00:00 2001 From: irungentoo Date: Thu, 2 Oct 2014 08:31:14 -0400 Subject: Removed useless code. --- toxcore/Messenger.c | 33 --------------------------------- toxcore/Messenger.h | 8 -------- 2 files changed, 41 deletions(-) diff --git a/toxcore/Messenger.c b/toxcore/Messenger.c index a78b06b6..d99b0027 100644 --- a/toxcore/Messenger.c +++ b/toxcore/Messenger.c @@ -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; -} diff --git a/toxcore/Messenger.h b/toxcore/Messenger.h index 42919a0d..6b7b5000 100644 --- a/toxcore/Messenger.h +++ b/toxcore/Messenger.h @@ -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 -- cgit v1.2.3