sbase

suckless unix tools
git clone git://git.suckless.org/sbase
Log | Files | Refs | README | LICENSE

commit 92f17ad648114ce6bf967d890053d5b6b8504c28
parent 2f0b15201d182f25dcb75891fc43190760d7529a
Author: Michael Forney <mforney@mforney.org>
Date:   Wed, 15 Apr 2020 16:13:22 -0700

paste: Minor style tweaks

Convert for-loop with no initial or continue expression into a
while-loop.

Drop unnecessary parentheses.

Diffstat:
Mpaste.c | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git 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') {