mirror of
https://github.com/nasa/trick.git
synced 2024-12-18 20:57:55 +00:00
Correct Monte Carlo compiler error on CentOS 7
Also change the Cannon sim monte_post jobs to use mc_read/write instead of tc_read/write Refs #396
This commit is contained in:
parent
80ab0767e2
commit
2335f6bb69
@ -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) ;
|
||||
|
@ -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) ;
|
||||
}
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user