diff options
author | Michael Vetter <jubalh@iodoru.org> | 2020-02-25 16:11:59 +0100 |
---|---|---|
committer | Michael Vetter <jubalh@iodoru.org> | 2020-02-25 16:11:59 +0100 |
commit | fc35a5a4921142f1425fc697c1e26b04b700dbf6 (patch) | |
tree | b60b47aebbe4519682b0e5d0449e46f3c0c1320b | |
parent | f597de4889177564a02b154ad7f05193e39a9057 (diff) | |
download | profani-tty-fc35a5a4921142f1425fc697c1e26b04b700dbf6.tar.gz |
Stop buffer_remove_entry_by_id() once we found the entry
No need to continue to loop through the rest.
-rw-r--r-- | src/ui/buffer.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/ui/buffer.c b/src/ui/buffer.c index 6a7f7818..c1d5e070 100644 --- a/src/ui/buffer.c +++ b/src/ui/buffer.c @@ -116,6 +116,7 @@ buffer_remove_entry_by_id(ProfBuff buffer, const char *const id) if (entry->id && (g_strcmp0(entry->id, id) == 0)) { _free_entry(entry); buffer->entries = g_slist_delete_link(buffer->entries, entries); + break; } entries = g_slist_next(entries); } |