error in client.connect() example

the code example in the reference
https://www.arduino.cc/en/Reference/ClientConnect
is wrong:
since the return values of ClientConnect function are:
SUCCESS 1
TIMED_OUT -1
INVALID_SERVER -2
TRUNCATED -3
INVALID_RESPONSE -4

to check if connection is OK you have to check:
if (client.connect(server, 80)==SUCCESS) {

but in example is reported:
if (client.connect(server, 80)) {
that return always true

can you correct this?