sbase

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

commit aba450fd1a1e5256d4ad11a914524055e081c0e2
parent 874d131728d5ae00a1ed5246cc4eecbaa839029d
Author: Hiltjo Posthuma <hiltjo@codemadness.org>
Date:   Sun,  6 Sep 2015 22:36:01 +0200

ls: printf("%s", s) -> fputs(s, stdout)

Diffstat:
Mls.c | 2+-
Msed.c | 2+-
2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/ls.c b/ls.c @@ -335,7 +335,7 @@ ls(const char *path, const struct entry *ent, int listdir) else putchar('\n'); - printf("%s", path); + fputs(path, stdout); lsdir(path, ent); tree[treeind].ino = 0; diff --git a/sed.c b/sed.c @@ -1326,7 +1326,7 @@ cmd_l(Cmd *c) */ for (p = patt.str, end = p + strlen(p); p < end; p += rlen) { if (isascii(*p) && escapes[(unsigned int)*p]) { - printf("%s", escapes[(unsigned int)*p]); + fputs(escapes[(unsigned int)*p], stdout); rlen = 1; } else if (!(rlen = charntorune(&r, p, end - p))) { /* ran out of chars, print the bytes of the short sequence */