Skip to content

Commit

Permalink
C99 build fix
Browse files Browse the repository at this point in the history
  • Loading branch information
sashacmc committed Apr 30, 2024
1 parent 2d4c588 commit 7ed9508
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions examples/unix/c99/z_sub_st.c
Original file line number Diff line number Diff line change
Expand Up @@ -88,9 +88,9 @@ int main(int argc, char **argv) {

z_owned_closure_sample_t callback = z_closure_sample(data_handler, NULL, NULL);
printf("Declaring Subscriber on '%s'...\n", keyexpr);
z_owned_subscriber_t sub =
z_declare_subscriber(z_session_loan(&s), z_keyexpr(keyexpr), z_closure_sample_move(&callback), NULL);
if (!z_subscriber_check(&sub)) {
z_owned_subscriber_t sub;
if (z_declare_subscriber(&sub, z_session_loan(&s), z_keyexpr(keyexpr), z_closure_sample_move(&callback), NULL) <
0) {
printf("Unable to declare subscriber.\n");
return -1;
}
Expand Down

0 comments on commit 7ed9508

Please sign in to comment.