diff options
Diffstat (limited to 'examples/print-thread-safe.c')
-rw-r--r-- | examples/print-thread-safe.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/examples/print-thread-safe.c b/examples/print-thread-safe.c index d1d3c55..c21d624 100644 --- a/examples/print-thread-safe.c +++ b/examples/print-thread-safe.c @@ -16,13 +16,14 @@ int main(void) if (el_option(EL_THREAD_SAFE, 1) != 0) { el_perror(ELF, "Failed to enable thread safety"); - goto error; + el_cleanup(); + return 1; } el_print(ELI, "Yeaaa.... there is no really good way to show"); el_print(ELI, "how pthread works in action, so this just checks"); el_print(ELI, "whether locking works at all"); -error: el_cleanup(); + return 0; } |