ewritestr: Remove duplicate shift of offset
Patch by mizmar@protonmail.com, thanks.
This commit is contained in:
parent
49e239fbb1
commit
ecf390259c
1
ii.c
1
ii.c
@ -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));
|
||||||
|
Loading…
Reference in New Issue
Block a user