mirror of
https://github.com/kiedtl/fire.git
synced 2024-12-22 06:06:40 +00:00
draw.c: remove redundant memset
This commit is contained in:
parent
f0db1af7a5
commit
5adc07df8f
6
draw.c
6
draw.c
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user