njh / EtherCard

EtherCard is an IPv4 driver for the ENC28J60 chip, compatible with Arduino IDE
https://www.aelius.com/njh/ethercard/
GNU General Public License v2.0
1.03k stars 455 forks source link

About client_postval #390

Open nopnop2002 opened 4 years ago

nopnop2002 commented 4 years ago

Thank you for great wrok.

I have a small problem.

https://github.com/njh/EtherCard/blob/master/src/tcpip.cpp#L47

 static const char *client_postval;

https://github.com/njh/EtherCard/blob/master/src/tcpip.cpp#L542

    if (client_postval == 0) {

https://github.com/njh/EtherCard/blob/master/src/tcpip.cpp#L562

                     strlen(client_postval),

https://github.com/njh/EtherCard/blob/master/src/tcpip.cpp#L588

client_postval = 0;

https://github.com/njh/EtherCard/blob/master/src/tcpip.cpp#L597

client_postval = postval;

These code may cause an error in the future.

client_postval = 0; --> client_postval = "";

if (client_postval == 0) --> if (strlen(client_postval) == 0)

Thank you.