From 40117cf370f3a2f5ff957c07940f0476659e8b8d Mon Sep 17 00:00:00 2001 From: James Booth Date: Sun, 13 May 2012 20:26:35 +0100 Subject: [PATCH] contact_list_add returns void --- contact_list.c | 10 +++++----- contact_list.h | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/contact_list.c b/contact_list.c index 1a88b690..1e4fb2d1 100644 --- a/contact_list.c +++ b/contact_list.c @@ -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; } } diff --git a/contact_list.h b/contact_list.h index 0f72bd08..1e2faea2 100644 --- a/contact_list.h +++ b/contact_list.h @@ -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);