mirror of
https://github.com/esphome/esphome.git
synced 2026-10-07 03:16:37 +00:00
Force braces around multi-line statements (#3094)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
This commit is contained in:
co-authored by
Jesse Hills
parent
6b27f2d2cf
commit
80d03a631e
@@ -88,9 +88,10 @@ class BSDSocketImpl : public Socket {
|
||||
for (int i = 0; i < iovcnt; i++) {
|
||||
ssize_t err = this->read(reinterpret_cast<uint8_t *>(iov[i].iov_base), iov[i].iov_len);
|
||||
if (err == -1) {
|
||||
if (ret != 0)
|
||||
if (ret != 0) {
|
||||
// if we already read some don't return an error
|
||||
break;
|
||||
}
|
||||
return err;
|
||||
}
|
||||
ret += err;
|
||||
@@ -115,9 +116,10 @@ class BSDSocketImpl : public Socket {
|
||||
ssize_t err =
|
||||
this->send(reinterpret_cast<uint8_t *>(iov[i].iov_base), iov[i].iov_len, i == iovcnt - 1 ? 0 : MSG_MORE);
|
||||
if (err == -1) {
|
||||
if (ret != 0)
|
||||
if (ret != 0) {
|
||||
// if we already wrote some don't return an error
|
||||
break;
|
||||
}
|
||||
return err;
|
||||
}
|
||||
ret += err;
|
||||
|
||||
Reference in New Issue
Block a user