mirror of
https://github.com/profanity-im/profanity.git
synced 2024-12-04 14:46:46 -05:00
contact_list_add returns void
This commit is contained in:
parent
1eb0890fed
commit
40117cf370
@ -84,7 +84,7 @@ int contact_list_remove(const char * const name)
|
||||
}
|
||||
}
|
||||
|
||||
int contact_list_add(const char * const name, const char * const show,
|
||||
void contact_list_add(const char * const name, const char * const show,
|
||||
const char * const status)
|
||||
{
|
||||
|
||||
@ -93,7 +93,7 @@ int contact_list_add(const char * const name, const char * const show,
|
||||
_contact_list = g_slist_append(_contact_list,
|
||||
p_contact_new(name, show, status));
|
||||
|
||||
return 1;
|
||||
return;
|
||||
} else {
|
||||
GSList *curr = _contact_list;
|
||||
|
||||
@ -104,12 +104,12 @@ int contact_list_add(const char * const name, const char * const show,
|
||||
if (strcmp(p_contact_name(curr_contact), name) > 0) {
|
||||
_contact_list = g_slist_insert_before(_contact_list,
|
||||
curr, p_contact_new(name, show, status));
|
||||
return 0;
|
||||
return;
|
||||
// update
|
||||
} else if (strcmp(p_contact_name(curr_contact), name) == 0) {
|
||||
p_contact_free(curr->data);
|
||||
curr->data = p_contact_new(name, show, status);
|
||||
return 0;
|
||||
return;
|
||||
}
|
||||
|
||||
curr = g_slist_next(curr);
|
||||
@ -119,7 +119,7 @@ int contact_list_add(const char * const name, const char * const show,
|
||||
_contact_list = g_slist_append(_contact_list,
|
||||
p_contact_new(name, show, status));
|
||||
|
||||
return 1;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -29,7 +29,7 @@
|
||||
|
||||
void contact_list_clear(void);
|
||||
void reset_search_attempts(void);
|
||||
int contact_list_add(const char * const name, const char * const show,
|
||||
void contact_list_add(const char * const name, const char * const show,
|
||||
const char * const status);
|
||||
int contact_list_remove(const char * const name);
|
||||
GSList * get_contact_list(void);
|
||||
|
Loading…
Reference in New Issue
Block a user