From f8babaa7036e6c538c7bc95950125257f20f7b43 Mon Sep 17 00:00:00 2001 From: Michael Ilyin Date: Sat, 17 Aug 2024 16:10:23 +0200 Subject: [PATCH] removed duplicated z_config_default (it's called in parsing args later) --- examples/z_delete.c | 1 - examples/z_get.c | 1 - examples/z_get_liveliness.c | 1 - examples/z_info.c | 1 - examples/z_liveliness.c | 1 - examples/z_non_blocking_get.c | 1 - examples/z_pub.c | 1 - examples/z_pub_attachment.c | 1 - examples/z_pub_cache.c | 1 - examples/z_pub_shm.c | 2 -- examples/z_pub_thr.c | 1 - examples/z_query_sub.c | 1 - examples/z_queryable_with_channels.c | 1 - examples/z_sub.c | 1 - examples/z_sub_attachment.c | 1 - examples/z_sub_liveliness.c | 1 - examples/z_sub_thr.c | 1 - 17 files changed, 18 deletions(-) diff --git a/examples/z_delete.c b/examples/z_delete.c index d0ea1712c..67c0f083a 100644 --- a/examples/z_delete.c +++ b/examples/z_delete.c @@ -26,7 +26,6 @@ struct args_t parse_args(int argc, char** argv, z_owned_config_t* config); int main(int argc, char** argv) { z_owned_config_t config; - z_config_default(&config); struct args_t args = parse_args(argc, argv, &config); printf("Opening session...\n"); diff --git a/examples/z_get.c b/examples/z_get.c index 6dc8f6342..c26b9cbb9 100644 --- a/examples/z_get.c +++ b/examples/z_get.c @@ -28,7 +28,6 @@ struct args_t parse_args(int argc, char** argv, z_owned_config_t* config); int main(int argc, char** argv) { z_owned_config_t config; - z_config_default(&config); struct args_t args = parse_args(argc, argv, &config); z_view_keyexpr_t keyexpr; diff --git a/examples/z_get_liveliness.c b/examples/z_get_liveliness.c index f4ad98ec8..60e101416 100644 --- a/examples/z_get_liveliness.c +++ b/examples/z_get_liveliness.c @@ -26,7 +26,6 @@ struct args_t parse_args(int argc, char** argv, z_owned_config_t* config); int main(int argc, char** argv) { z_owned_config_t config; - z_config_default(&config); struct args_t args = parse_args(argc, argv, &config); z_view_keyexpr_t keyexpr; diff --git a/examples/z_info.c b/examples/z_info.c index 59fd032b2..be40b5254 100644 --- a/examples/z_info.c +++ b/examples/z_info.c @@ -27,7 +27,6 @@ void print_zid(const z_id_t* id, void* ctx) { int main(int argc, char** argv) { z_owned_config_t config; - z_config_default(&config); parse_args(argc, argv, &config); printf("Opening session...\n"); diff --git a/examples/z_liveliness.c b/examples/z_liveliness.c index 92fe6f159..de0dd95db 100644 --- a/examples/z_liveliness.c +++ b/examples/z_liveliness.c @@ -26,7 +26,6 @@ struct args_t parse_args(int argc, char** argv, z_owned_config_t* config); int main(int argc, char** argv) { z_owned_config_t config; - z_config_default(&config); struct args_t args = parse_args(argc, argv, &config); z_view_keyexpr_t keyexpr; diff --git a/examples/z_non_blocking_get.c b/examples/z_non_blocking_get.c index 71f4fd8e7..1f834d769 100644 --- a/examples/z_non_blocking_get.c +++ b/examples/z_non_blocking_get.c @@ -26,7 +26,6 @@ struct args_t parse_args(int argc, char** argv, z_owned_config_t* config); int main(int argc, char** argv) { z_owned_config_t config; - z_config_default(&config); struct args_t args = parse_args(argc, argv, &config); z_view_keyexpr_t keyexpr; diff --git a/examples/z_pub.c b/examples/z_pub.c index 7bfa2a4b4..6aa478a30 100644 --- a/examples/z_pub.c +++ b/examples/z_pub.c @@ -39,7 +39,6 @@ void matching_status_handler(const zc_matching_status_t* matching_status, void* int main(int argc, char** argv) { z_owned_config_t config; - z_config_default(&config); struct args_t args = parse_args(argc, argv, &config); printf("Opening session...\n"); diff --git a/examples/z_pub_attachment.c b/examples/z_pub_attachment.c index b177777d4..ed947262b 100644 --- a/examples/z_pub_attachment.c +++ b/examples/z_pub_attachment.c @@ -51,7 +51,6 @@ struct args_t parse_args(int argc, char** argv, z_owned_config_t* config); int main(int argc, char** argv) { z_owned_config_t config; - z_config_default(&config); struct args_t args = parse_args(argc, argv, &config); printf("Opening session...\n"); diff --git a/examples/z_pub_cache.c b/examples/z_pub_cache.c index c2796b6e8..e2de9caf9 100644 --- a/examples/z_pub_cache.c +++ b/examples/z_pub_cache.c @@ -30,7 +30,6 @@ struct args_t parse_args(int argc, char** argv, z_owned_config_t* config); int main(int argc, char** argv) { z_owned_config_t config; - z_config_default(&config); struct args_t args = parse_args(argc, argv, &config); if (zc_config_insert_json(z_loan_mut(config), Z_CONFIG_ADD_TIMESTAMP_KEY, "true") < 0) { diff --git a/examples/z_pub_shm.c b/examples/z_pub_shm.c index 6bb474063..461816aca 100644 --- a/examples/z_pub_shm.c +++ b/examples/z_pub_shm.c @@ -29,10 +29,8 @@ struct args_t parse_args(int argc, char** argv, z_owned_config_t* config); int main(int argc, char** argv) { z_owned_config_t config; - z_config_default(&config); struct args_t args = parse_args(argc, argv, &config); - printf("Opening session...\n"); z_owned_session_t s; if (z_open(&s, z_move(config)) < 0) { diff --git a/examples/z_pub_thr.c b/examples/z_pub_thr.c index 1cf98b99b..ebd1d7f0f 100644 --- a/examples/z_pub_thr.c +++ b/examples/z_pub_thr.c @@ -26,7 +26,6 @@ int main(int argc, char** argv) { char* keyexpr = "test/thr"; z_owned_config_t config; - z_config_default(&config); struct args_t args = parse_args(argc, argv, &config); uint8_t* value = (uint8_t*)z_malloc(args.size); memset(value, 1, args.size); diff --git a/examples/z_query_sub.c b/examples/z_query_sub.c index 715fb90c8..e17a48b43 100644 --- a/examples/z_query_sub.c +++ b/examples/z_query_sub.c @@ -39,7 +39,6 @@ void data_handler(const z_loaned_sample_t* sample, void* arg) { int main(int argc, char** argv) { z_owned_config_t config; - z_config_default(&config); struct args_t args = parse_args(argc, argv, &config); printf("Opening session...\n"); diff --git a/examples/z_queryable_with_channels.c b/examples/z_queryable_with_channels.c index df28ec399..4e8b6b856 100644 --- a/examples/z_queryable_with_channels.c +++ b/examples/z_queryable_with_channels.c @@ -30,7 +30,6 @@ z_view_keyexpr_t ke; int main(int argc, char** argv) { z_owned_config_t config; - z_config_default(&config); struct args_t args = parse_args(argc, argv, &config); printf("Opening session...\n"); diff --git a/examples/z_sub.c b/examples/z_sub.c index 1834b705a..41dfdeff5 100644 --- a/examples/z_sub.c +++ b/examples/z_sub.c @@ -40,7 +40,6 @@ void data_handler(const z_loaned_sample_t *sample, void *arg) { int main(int argc, char **argv) { z_owned_config_t config; - z_config_default(&config); struct args_t args = parse_args(argc, argv, &config); z_view_keyexpr_t ke; z_view_keyexpr_from_str(&ke, args.keyexpr); diff --git a/examples/z_sub_attachment.c b/examples/z_sub_attachment.c index 29c66279f..20cef431e 100644 --- a/examples/z_sub_attachment.c +++ b/examples/z_sub_attachment.c @@ -64,7 +64,6 @@ void data_handler(const z_loaned_sample_t* sample, void* arg) { int main(int argc, char** argv) { z_owned_config_t config; - z_config_default(&config); struct args_t args = parse_args(argc, argv, &config); z_view_keyexpr_t ke; z_view_keyexpr_from_str(&ke, args.keyexpr); diff --git a/examples/z_sub_liveliness.c b/examples/z_sub_liveliness.c index 402a00ae3..bb2d4fc0f 100644 --- a/examples/z_sub_liveliness.c +++ b/examples/z_sub_liveliness.c @@ -40,7 +40,6 @@ void data_handler(const z_loaned_sample_t* sample, void* arg) { int main(int argc, char** argv) { z_owned_config_t config; - z_config_default(&config); struct args_t args = parse_args(argc, argv, &config); z_view_keyexpr_t ke; if (z_view_keyexpr_from_str(&ke, args.keyexpr) < 0) { diff --git a/examples/z_sub_thr.c b/examples/z_sub_thr.c index e380711cf..75367f065 100644 --- a/examples/z_sub_thr.c +++ b/examples/z_sub_thr.c @@ -64,7 +64,6 @@ void drop_stats(void *context) { int main(int argc, char **argv) { z_owned_config_t config; - z_config_default(&config); parse_args(argc, argv, &config); #ifdef SHARED_MEMORY