- fixed some uninitialized values found with valgrind
This commit is contained in:
parent
a304bd5fd7
commit
f5ca539534
@ -1006,6 +1006,7 @@ int redolog_t::make_header(const char* type, Bit64u size)
|
||||
Bit32u flip=0;
|
||||
|
||||
// Set standard header values
|
||||
memset(&header, 0, sizeof(redolog_header_t));
|
||||
strcpy((char*)header.standard.magic, STANDARD_HEADER_MAGIC);
|
||||
strcpy((char*)header.standard.type, REDOLOG_TYPE);
|
||||
strcpy((char*)header.standard.subtype, type);
|
||||
|
@ -213,6 +213,8 @@ bx_sb16_c::bx_sb16_c(void)
|
||||
memset(&mpu401, 0, sizeof(mpu401));
|
||||
memset(&dsp, 0, sizeof(dsp));
|
||||
memset(&opl, 0, sizeof(opl));
|
||||
currentdma8 = 0;
|
||||
currentdma16 = 0;
|
||||
mpu401.timer_handle = BX_NULL_TIMER_HANDLE;
|
||||
dsp.timer_handle = BX_NULL_TIMER_HANDLE;
|
||||
opl.timer_handle = BX_NULL_TIMER_HANDLE;
|
||||
|
@ -113,6 +113,7 @@ static inline int array_ensure_allocated(array_t* array, int index)
|
||||
array->pointer = (char*)realloc(array->pointer, new_size);
|
||||
if (!array->pointer)
|
||||
return -1;
|
||||
memset(array->pointer + array->size, 0, new_size - array->size);
|
||||
array->size = new_size;
|
||||
array->next = index + 1;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user