]> git.ipfire.org Git - thirdparty/systemd.git/commit
sysupdate: Fix resource_find_instance
authorAdrian Vovk <adrianvovk@gmail.com>
Sat, 22 Jun 2024 00:03:12 +0000 (20:03 -0400)
committerAdrian Vovk <adrianvovk@gmail.com>
Thu, 22 Aug 2024 20:00:43 +0000 (16:00 -0400)
commit79348036342e80eefd59e9828c664b95c19319bc
treeada57bd374c4520ac4e8cddf58b02691f84b438c
parentf134a79ff8f2146e0f5aa9570df02431d246e9da
sysupdate: Fix resource_find_instance

The current implementation will never find a match, because in the event
of a match instance_cmp falls through to comparing paths and the key
we're matching against will always have a path of NULL.

So let's just use a separate compare function, just to make sure future
updates to instance_cmp don't break resource_find_instance again.
src/sysupdate/sysupdate-resource.c