1
1
mirror of https://github.com/profanity-im/profanity.git synced 2025-01-03 14:57:42 -05:00

Stop buffer_remove_entry_by_id() once we found the entry

No need to continue to loop through the rest.
This commit is contained in:
Michael Vetter 2020-02-25 16:11:59 +01:00
parent f597de4889
commit fc35a5a492

View File

@ -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);
}