diff options
| author | Frank LENORMAND <lenormf@gmail.com> | 2015-12-10 11:00:10 +0300 |
|---|---|---|
| committer | Frank LENORMAND <lenormf@gmail.com> | 2015-12-10 11:00:10 +0300 |
| commit | df31b88187bc1e262abbeddc63c6cde6331bf07a (patch) | |
| tree | c2c20df6a0382de5f97d77ff9606cef22b48f712 /src/remote.cc | |
| parent | 2ca1784495f1497b7d93cd0401244ad7d3bcc900 (diff) | |
Fix "unused result" warnings for several system calls.
Diffstat (limited to 'src/remote.cc')
| -rw-r--r-- | src/remote.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/remote.cc b/src/remote.cc index 6169e906..e15d4d0f 100644 --- a/src/remote.cc +++ b/src/remote.cc @@ -532,7 +532,8 @@ void RemoteClient::write_next_key() void send_command(StringView session, StringView command) { int sock = connect_to(session); - ::write(sock, command.data(), (int)command.length()); + if (::write(sock, command.data(), (int)command.length()) < 0) + throw runtime_error(format("unable to write data to socket (fd: {}; errno: {})", sock, ::strerror(errno))); close(sock); } |
