Skip to content

Commit 84cfba0

Browse files
committed
EthernetClient - fix NULL data field checks
1 parent f450c59 commit 84cfba0

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/EthernetClient.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ UIPClient::flush()
268268
int
269269
UIPClient::available()
270270
{
271-
if (!(*this))
271+
if (!data)
272272
return 0;
273273

274274
int len = 0;
@@ -286,7 +286,7 @@ UIPClient::available()
286286
int
287287
UIPClient::read(uint8_t *buf, size_t size)
288288
{
289-
if (*this)
289+
if (data)
290290
{
291291
uint16_t remain = size;
292292
if (data->packets_in[0] == NOBLOCK)
@@ -338,7 +338,7 @@ UIPClient::read()
338338
int
339339
UIPClient::peek()
340340
{
341-
if (*this)
341+
if (data)
342342
{
343343
if (data->packets_in[0] != NOBLOCK)
344344
{
@@ -353,7 +353,7 @@ UIPClient::peek()
353353
void
354354
UIPClient::discardReceived()
355355
{
356-
if (*this)
356+
if (data)
357357
{
358358
_flushBlocks(data->packets_in);
359359
}

0 commit comments

Comments
 (0)