summaryrefslogtreecommitdiffstats
path: root/src/api.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/api.c')
-rw-r--r--src/api.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/api.c b/src/api.c
index 7171e3a..a9d9f77 100644
--- a/src/api.c
+++ b/src/api.c
@@ -135,8 +135,8 @@ signed char dc_json_cb (struct lejp_ctx * ctx, char reason) { /* to prevent warn
}
if (path == DC_JSON_DM && reason == LEJPCB_OBJECT_END) {
struct dc_channel ** channel = &client->guilds[0]->channel; /* 1. guild = DMs */
- while (*channel)
- channel = &(*channel)->next;
+ while (*channel) /* a ni to malo kremž? zakaj dodajam na konec, če bi lahko samo */
+ channel = &(*channel)->next; /* dodal na začetek v O(1) */
if (!pass->api_io.channel->id) {
dc_channel_free(pass->api_io.channel, DC_UNSET);
pass->api_io.channel = NULL;