commit 92f17ad648114ce6bf967d890053d5b6b8504c28
Author:     Michael Forney <[email protected]>
AuthorDate: Wed Apr 15 16:13:22 2020 -0700
Commit:     Michael Forney <[email protected]>
CommitDate: Wed Apr 15 16:13:22 2020 -0700

    paste: Minor style tweaks
    
    Convert for-loop with no initial or continue expression into a
    while-loop.
    
    Drop unnecessary parentheses.

diff --git a/paste.c b/paste.c
index 0385efa..4fa9fc5 100644
--- a/paste.c
+++ b/paste.c
@@ -51,10 +51,10 @@ nextline:
                d = delim[i % delimlen];
                c = 0;
 
-               for (; efgetrune(&c, dsc[i].fp, dsc[i].name) ;) {
+               while (efgetrune(&c, dsc[i].fp, dsc[i].name)) {
                        for (m = last + 1; m < i; m++) {
                                if (delim[m % delimlen] != '\0')
-                                       efputrune(&(delim[m % delimlen]), 
stdout, "<stdout>");
+                                       efputrune(&delim[m % delimlen], stdout, 
"<stdout>");
                        }
                        last = i;
                        if (c == '\n') {

Reply via email to