From adfc9217d739dadd0099797cbf5cb6dc6594c72c Mon Sep 17 00:00:00 2001 From: default Date: Fri, 2 Dec 2022 21:24:17 +0100 Subject: [PATCH] Use xs_set_result() in timeline_top_level(). --- data.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/data.c b/data.c index e98cca9..a2242e8 100644 --- a/data.c +++ b/data.c @@ -806,7 +806,6 @@ void timeline_admire(snac *snac, char *o_msg, char *id, char *admirer, int like) d_char *timeline_top_level(d_char *list) /* returns the top level md5 entries from this index */ { - d_char *tl = xs_list_new(); xs_set seen; char *p, *v; @@ -833,13 +832,10 @@ d_char *timeline_top_level(d_char *list) strcpy(line, line2); } - if (xs_set_add(&seen, line) == 1) - tl = xs_list_append(tl, line); + xs_set_add(&seen, line); } - xs_set_free(&seen); - - return tl; + return xs_set_result(&seen); }