mirror of
https://github.com/yrutschle/sslh.git
synced 2025-04-13 07:37:15 +03:00
Merge pull request #294 from wltu/fix-unused-result
Fixed unused result issue with write()
This commit is contained in:
commit
8e38d56167
@ -81,7 +81,9 @@ void start_echo(int fd)
|
||||
if (first) {
|
||||
res = write(fd, buffer, ret + prefix_len);
|
||||
first = 0;
|
||||
write(1, buffer, ret + prefix_len);
|
||||
if (write(1, buffer, ret + prefix_len) < 0) {
|
||||
fprintf(stderr, "%s", strerror(errno));
|
||||
}
|
||||
} else {
|
||||
res = write(fd, buffer + prefix_len, ret);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user