about summary refs log tree commit diff stats
path: root/src/ui/buffer.c
diff options
context:
space:
mode:
authorMichael Vetter <jubalh@iodoru.org>2020-02-25 16:11:59 +0100
committerMichael Vetter <jubalh@iodoru.org>2020-02-25 16:11:59 +0100
commitfc35a5a4921142f1425fc697c1e26b04b700dbf6 (patch)
treeb60b47aebbe4519682b0e5d0449e46f3c0c1320b /src/ui/buffer.c
parentf597de4889177564a02b154ad7f05193e39a9057 (diff)
downloadprofani-tty-fc35a5a4921142f1425fc697c1e26b04b700dbf6.tar.gz
Stop buffer_remove_entry_by_id() once we found the entry
No need to continue to loop through the rest.
Diffstat (limited to 'src/ui/buffer.c')
-rw-r--r--src/ui/buffer.c1
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);
     }