From: Siraaj Khandkar Date: Tue, 10 Mar 2020 13:44:04 +0000 (-0400) Subject: Add optimization TODO X-Git-Url: https://git.xandkar.net/?a=commitdiff_plain;h=45f1ce6e2dbaedd30f0ceed2d8f3feb4afa157a6;p=khatus.git Add optimization TODO --- diff --git a/x5/khatus.c b/x5/khatus.c index 7f49542..293b346 100644 --- a/x5/khatus.c +++ b/x5/khatus.c @@ -255,6 +255,7 @@ read_one(Fifo *f, char *buf) total = 0; c = '\0'; b = buf + f->pos; + /* TODO: Could optimize here and only blank-out the remaining slots. */ memset(b, ' ', f->width); while ((current = read(f->fd, &c, 1)) && c != '\n' && c != '\0' && total++ < f->width) *b++ = c;