Skip to content

Commit

Permalink
Example cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
sashacmc committed Nov 7, 2024
1 parent 4580eb0 commit cd3dca9
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions examples/unix/c11/z_sub_liveliness.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
// ZettaScale Zenoh Team, <[email protected]>
//

#include <ctype.h>
#include <stddef.h>
#include <stdint.h>
#include <stdio.h>
Expand All @@ -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;
Expand Down Expand Up @@ -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));
Expand Down

0 comments on commit cd3dca9

Please sign in to comment.