Skip to content

Commit

Permalink
WiFiServer.cpp: Fix warning (#7755)
Browse files Browse the repository at this point in the history
* fix warning as below:

...\libraries\ESP8266WiFi\src\WiFiServer.cpp: In member function 'WiFiClient WiFiServer::available(byte*)':
...\libraries\ESP8266WiFi\src\WiFiServer.cpp:120:55: warning: suggest braces around empty body in an 'if' statement [-Wempty-body]
  120 |             tcp_backlog_accepted(_unclaimed->getPCB());
      |                                                       ^
  • Loading branch information
jjsuwa-sys3175 authored Dec 11, 2020
1 parent 4566400 commit 0f58a90
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion libraries/ESP8266WiFi/src/WiFiServer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,10 @@ WiFiClient WiFiServer::available(byte* status) {
WiFiClient result(_unclaimed);

// pcb can be null when peer has already closed the connection
if (_unclaimed->getPCB())
if (_unclaimed->getPCB()) {
// give permission to lwIP to accept one more peer
tcp_backlog_accepted(_unclaimed->getPCB());
}

_unclaimed = _unclaimed->next();
result.setNoDelay(getNoDelay());
Expand Down

0 comments on commit 0f58a90

Please sign in to comment.