diff --git a/trick_sims/Cannon/models/cannon/optim/src/cannon_post_master.c b/trick_sims/Cannon/models/cannon/optim/src/cannon_post_master.c index 9149a3ae..383aa8f5 100644 --- a/trick_sims/Cannon/models/cannon/optim/src/cannon_post_master.c +++ b/trick_sims/Cannon/models/cannon/optim/src/cannon_post_master.c @@ -20,7 +20,7 @@ int cannon_post_master( (void)C ; /* Read slave's results */ - tc_read( mc_get_connection_device(),(char*) &C_curr, sizeof(CANNON_AERO) ); + mc_read( (char*) &C_curr, sizeof(CANNON_AERO) ); fprintf(stderr, "%03d> F(", mc_get_current_run()); amoeba_print_point(4, A->curr_point) ; diff --git a/trick_sims/Cannon/models/cannon/optim/src/cannon_post_slave.c b/trick_sims/Cannon/models/cannon/optim/src/cannon_post_slave.c index 44536f68..a5999992 100644 --- a/trick_sims/Cannon/models/cannon/optim/src/cannon_post_slave.c +++ b/trick_sims/Cannon/models/cannon/optim/src/cannon_post_slave.c @@ -13,6 +13,6 @@ int cannon_post_slave( { /* Send slave results */ - tc_write( mc_get_connection_device(), (char*) C, sizeof(CANNON_AERO) ); + mc_write( (char*) C, sizeof(CANNON_AERO) ); return(0) ; } diff --git a/trick_source/sim_services/MonteCarlo/MonteCarlo_receive_results.cpp b/trick_source/sim_services/MonteCarlo/MonteCarlo_receive_results.cpp index 32504b1a..613889c2 100644 --- a/trick_source/sim_services/MonteCarlo/MonteCarlo_receive_results.cpp +++ b/trick_source/sim_services/MonteCarlo/MonteCarlo_receive_results.cpp @@ -55,7 +55,8 @@ void Trick::MonteCarlo::handle_initialization(Trick::MonteSlave& slave) { } size = ntohl(size); - char name[size + 1] = {}; + char name[size + 1]; + name[size] = '\0'; if (tc_read(&connection_device, name, size) != size) { set_disconnected_state(slave); return;