mirror of
https://github.com/nasa/trick.git
synced 2025-01-18 02:40:08 +00:00
Correct the sizeof() arg to memset call in test fixture. Ref #541.
This commit is contained in:
parent
5db74dc804
commit
020dd0c1c9
@ -19,7 +19,7 @@ class TCConnectTest : public testing::Test {
|
||||
|
||||
/* device */
|
||||
device = (TCDevice *) malloc(sizeof(TCDevice));
|
||||
memset( (void *)device,'\0',sizeof(device) );
|
||||
memset( (void *)device,'\0',sizeof(TCDevice) );
|
||||
device->hostname = strdup("127.0.0.1");
|
||||
device->disabled = TC_COMM_FALSE;
|
||||
device->disable_handshaking = TC_COMM_DISABLED;
|
||||
@ -29,6 +29,7 @@ class TCConnectTest : public testing::Test {
|
||||
|
||||
void TearDown(){
|
||||
|
||||
free(device->hostname);
|
||||
free(device);
|
||||
}
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user