draw.c: remove redundant memset

This commit is contained in:
Kiëd Llaentenn 2020-09-17 12:07:24 +00:00
parent f0db1af7a5
commit 5adc07df8f
1 changed files with 2 additions and 4 deletions

6
draw.c
View File

@ -30,14 +30,12 @@ init(struct buffer *buf)
len -= buf->width;
if (buf->buf == NULL) {
PRINT("fire: cannot ");
EPRINT("fire: cannot ");
perror("calloc()");
exit(1);
}
// initialize the entire screen to black...
memset(buf->buf, 0, len);
// calloc sets the entire screen to black
// ...except for the last row, which is white.
// this is the 'base' of the fire.
memset(buf->buf + len, 12, buf->width);