]> git.proxmox.com Git - mirror_corosync-qdevice.git/commit
pr-poll-loop: Fix set_events_cb return code
authorJan Friesse <jfriesse@redhat.com>
Mon, 31 Aug 2020 08:08:45 +0000 (10:08 +0200)
committerJan Friesse <jfriesse@redhat.com>
Mon, 31 Aug 2020 15:04:49 +0000 (17:04 +0200)
commit07a7e8a7abf44c97600f54b32254e70260b19f01
tree1944bd14287e1e54ba688ed0a77fc74ec45bfe5c
parent6bf5f6c011cca5ec25c23b0f2b4adfc605eaa65d
pr-poll-loop: Fix set_events_cb return code

When events is set to 0 and set_events return -2 it was changed to -1.
Solution is to check, if return code was 0 and only if so, change return
code to -1 if events is 0.

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
qdevices/pr-poll-loop.c
qdevices/test-pr-poll-loop.c