1
0
mirror of https://github.com/pevans/erc-c.git synced 2024-09-30 02:54:41 +00:00

Zero, not NULL.

Not that there's a practical difference, but we should be clear that
we're zeroing out memory because its contents are vm_8bit values, not
pointers.
This commit is contained in:
Peter Evans 2017-12-12 14:45:48 -06:00
parent 0bcf9e006d
commit bb92162dba

View File

@ -38,9 +38,9 @@ vm_segment_create(size_t size)
return NULL;
}
// We should NULL out memory and make explicit that any new segment
// We should zero out memory and make explicit that any new segment
// begins life in that state.
memset(segment->memory, (int)NULL, sizeof(vm_8bit));
memset(segment->memory, 0, sizeof(vm_8bit));
segment->read_table = malloc(sizeof(vm_segment_read_fn) * size);
if (segment->read_table == NULL) {