grid: grid_memset() -> grid_memclear()

This commit is contained in:
Daniel Eklöf 2019-07-07 17:10:15 +02:00
parent abff0e205e
commit 48528419c4
No known key found for this signature in database
GPG key ID: 5BBD4992C116573F
4 changed files with 7 additions and 8 deletions

4
grid.c
View file

@ -27,7 +27,7 @@ grid_get_range(struct grid *grid, int start, int *length)
}
void
grid_memset(struct grid *grid, int start, int c, int length)
grid_memclear(struct grid *grid, int start, int length)
{
int left = length;
while (left > 0) {
@ -37,7 +37,7 @@ grid_memset(struct grid *grid, int start, int c, int length)
assert(count > 0);
assert(count <= left);
memset(cells, c, count * sizeof(cells[0]));
memset(cells, 0, count * sizeof(cells[0]));
left -= count;
start += count;