gods

a simple blocklist for ssh
Log | Files | Refs | README | LICENSE

commit 1a8e6505e90f1b3cb1449e284b00452b8c5cb5ba
parent d9d4f0108ccea40b90bc91e2dde37e07f91495dc
Author: Naveen Narayanan <zerous@nocebo.space>
Date:   Tue, 19 Oct 2021 23:19:34 +0200

Use memmove instead of for loop

Diffstat:
Mmain.c | 3+--
1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/main.c b/main.c @@ -71,8 +71,7 @@ readline(int fd) int n; if (rem) - for (int i = 0; i < rem; ++i) - buf[i] = next[i]; + memmove(buf, next, rem); if ((n = read(fd, buf+rem, BUFSZ-rem)) == -1) err(1, "read failed");