ratox

FIFO based tox client
git clone git://git.2f30.org/ratox.git
Log | Files | Refs | README | LICENSE

commit 6fc1ba2feb25044623c4adbef1c714b7a84f9cbf
parent d81013a3063e918ba30bf83e6255619ba2b108c0
Author: pranomostro <pranomestro@gmail.com>
Date:   Thu Dec  1 22:43:44 +0100

Remove the return value from friendcreate()

It is not used anywhere and it is unlikely that this will
change anytime.

Diffstat:
ratox.c | 10++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/ratox.c b/ratox.c @@ -221,7 +221,7 @@ static int toxinit(void); static int toxconnect(void); static void id2str(uint8_t *, char *); static void str2id(char *, uint8_t *); -static struct friend *friendcreate(uint32_t); +static void friendcreate(uint32_t); static void friendload(void); static void frienddestroy(struct friend *); static void loop(void); @@ -1235,7 +1235,7 @@ str2id(char *idstr, uint8_t *id) sscanf(p, "%2hhx", &id[i]); } -static struct friend * +static void friendcreate(uint32_t frnum) { struct friend *f; @@ -1252,7 +1252,7 @@ friendcreate(uint32_t frnum) i = tox_friend_get_name_size(tox, frnum, &err); if (err != TOX_ERR_FRIEND_QUERY_OK) { weprintf(": %ld : Name : Failed to get\n", (long)frnum); - return NULL; + return; } else if (i == 0) { snprintf(f->name, sizeof(f->name), "Anonymous"); } else { @@ -1263,7 +1263,7 @@ friendcreate(uint32_t frnum) f->num = frnum; if (!tox_friend_get_public_key(tox, f->num, f->id, NULL)) { weprintf(": %s: Key : Failed to get\n", f->name); - return NULL; + return; } id2str(f->id, f->idstr); @@ -1322,8 +1322,6 @@ friendcreate(uint32_t frnum) f->av.state = 0; TAILQ_INSERT_TAIL(&friendhead, f, entry); - - return f; } static void