mirror of
https://github.com/kiedtl/fire.git
synced 2024-12-22 14:16:43 +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;
|
len -= buf->width;
|
||||||
|
|
||||||
if (buf->buf == NULL) {
|
if (buf->buf == NULL) {
|
||||||
PRINT("fire: cannot ");
|
EPRINT("fire: cannot ");
|
||||||
perror("calloc()");
|
perror("calloc()");
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
// initialize the entire screen to black...
|
// calloc sets the entire screen to black
|
||||||
memset(buf->buf, 0, len);
|
|
||||||
|
|
||||||
// ...except for the last row, which is white.
|
// ...except for the last row, which is white.
|
||||||
// this is the 'base' of the fire.
|
// this is the 'base' of the fire.
|
||||||
memset(buf->buf + len, 12, buf->width);
|
memset(buf->buf + len, 12, buf->width);
|
||||||
|
Loading…
Reference in New Issue
Block a user