From cd3dca91db57cc73dd69ffe4fd59f8fd535affb0 Mon Sep 17 00:00:00 2001 From: Alexander Bushnev Date: Thu, 7 Nov 2024 10:30:07 +0100 Subject: [PATCH] Example cleanup --- examples/unix/c11/z_sub_liveliness.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/examples/unix/c11/z_sub_liveliness.c b/examples/unix/c11/z_sub_liveliness.c index befcdce0d..0fe79aaf0 100644 --- a/examples/unix/c11/z_sub_liveliness.c +++ b/examples/unix/c11/z_sub_liveliness.c @@ -12,7 +12,6 @@ // ZettaScale Zenoh Team, // -#include #include #include #include @@ -22,8 +21,6 @@ #if Z_FEATURE_SUBSCRIPTION == 1 && Z_FEATURE_LIVELINESS == 1 -static int msg_nb = 0; - void data_handler(z_loaned_sample_t *sample, void *ctx) { (void)(ctx); z_view_string_t key_string; @@ -117,13 +114,7 @@ int main(int argc, char **argv) { while (1) { z_sleep_s(1); } - printf("Press CTRL-C to quit...\n"); - while (1) { - if ((n != 0) && (msg_nb >= n)) { - break; - } - sleep(1); - } + // Clean up z_drop(z_move(sub)); z_drop(z_move(s));