libubus: use list_empty/list_first_entry in ubus_process_pending_msg
authorFelix Fietkau <nbd@nbd.name>
Mon, 9 Aug 2021 10:49:34 +0000 (12:49 +0200)
committerPetr Štetiar <ynezz@true.cz>
Tue, 15 Feb 2022 17:10:07 +0000 (18:10 +0100)
commitc3f3e194870973a888cabc7129f6f8ec0c3cccee
treebebf6e45a73ad4c0fdd2b8a5c5e94e06ba29654f
parent38c7fdd8991366cd2f9ccbc47625f9b51b1d318a
libubus: use list_empty/list_first_entry in ubus_process_pending_msg

Simplifies checks and avoids potential list corruption on recursive calls

Signed-off-by: Felix Fietkau <nbd@nbd.name>
(cherry picked from commit 2099bb3ad9972c6188c38fd885ae74f3323fcacc)
libubus.c