mirror of
https://github.com/nasa/trick.git
synced 2025-01-29 15:43:57 +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 */
|
||||||
device = (TCDevice *) malloc(sizeof(TCDevice));
|
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->hostname = strdup("127.0.0.1");
|
||||||
device->disabled = TC_COMM_FALSE;
|
device->disabled = TC_COMM_FALSE;
|
||||||
device->disable_handshaking = TC_COMM_DISABLED;
|
device->disable_handshaking = TC_COMM_DISABLED;
|
||||||
@ -29,6 +29,7 @@ class TCConnectTest : public testing::Test {
|
|||||||
|
|
||||||
void TearDown(){
|
void TearDown(){
|
||||||
|
|
||||||
|
free(device->hostname);
|
||||||
free(device);
|
free(device);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user