From 0a8fc205c714ade6f2840ee8c2eeddb49102a10c Mon Sep 17 00:00:00 2001 From: Tim Whisonant Date: Mon, 19 Dec 2022 17:11:29 +0000 Subject: [PATCH] Fix hello_events unit tests. Signed-off-by: Tim Whisonant --- samples/hello_events/hello_events.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/samples/hello_events/hello_events.c b/samples/hello_events/hello_events.c index 80fe871f1b5c..8cfb8a7b11f1 100644 --- a/samples/hello_events/hello_events.c +++ b/samples/hello_events/hello_events.c @@ -321,10 +321,11 @@ int main(int argc, char *argv[]) out_join: pthread_join(errthr, NULL); - res1 = fpgaUnregisterEvent(fpga_device_handle, FPGA_EVENT_ERROR, eh); - ON_ERR_GOTO(res1, out_destroy_eh, "unregistering an FME event"); + res2 = fpgaUnregisterEvent(fpga_device_handle, FPGA_EVENT_ERROR, eh); + ON_ERR_GOTO(res2, out_destroy_eh, "unregistering an FME event"); - printf("Successfully tested Register/Unregister for FME events!\n"); + if (res1 == FPGA_OK) + printf("Successfully tested Register/Unregister for FME events!\n"); out_destroy_eh: res2 = fpgaDestroyEventHandle(&eh);