ewritestr: Remove duplicate shift of offset

Patch by mizmar@protonmail.com, thanks.
This commit is contained in:
Hiltjo Posthuma 2020-07-05 22:32:13 +02:00
parent 49e239fbb1
commit ecf390259c

1
ii.c
View File

@ -102,7 +102,6 @@ ewritestr(int fd, const char *s)
for (off = 0; off < len; off += w) { for (off = 0; off < len; off += w) {
if ((w = write(fd, s + off, len - off)) == -1) if ((w = write(fd, s + off, len - off)) == -1)
break; break;
off += w;
} }
if (w == -1) { if (w == -1) {
fprintf(stderr, "%s: write: %s\n", argv0, strerror(errno)); fprintf(stderr, "%s: write: %s\n", argv0, strerror(errno));