Add optimization TODO
[khatus.git] / x5 / khatus.c
index 341464e..293b346 100644 (file)
@@ -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;
@@ -308,9 +309,9 @@ read_all(Config *cfg, char *buf)
 int
 main(int argc, char *argv[])
 {
-       int width;
+       int width  = 0;
        int nfifos = 0;
-       int seplen;
+       int seplen = 0;
        int prefix = 0;
        char *buf;
        Config cfg0 = defaults;
This page took 0.027396 seconds and 4 git commands to generate.