pidgin/pidgin

bonjour: refactor _match_buddies_by_address

2021-02-28, Arkadiy Illarionov
adaa32e9d793
bonjour: refactor _match_buddies_by_address

* Use `g_slist_find_custom` instead of manual search. `BonjourBuddy` doesn't have `NULL` data in `ips` list.
* Add `_find_match_buddies_by_address` to reduce copypaste.
* Change comparisons order to reduce nesting.

Testing Done:
Compile.

Reviewed at https://reviews.imfreedom.org/r/545/
---
id: im.pidgin.Finch3
runtime: org.gnome.Platform
runtime-version: '3.36'
sdk: org.gnome.Sdk
command: finch3
finish-args:
- --share=ipc
- --socket=x11
- --share=network
- --talk-name=org.freedesktop.Notifications
- --system-talk-name=org.freedesktop.Avahi
modules:
- packaging/flatpak/libpurple-common.yml
- packaging/flatpak/libgnt.yml
- name: finch3
buildsystem: meson
config-opts:
- -Dgtkui=false
- -Ddoc=false
sources:
- type: dir
path: '.'