cddb_server.cpp: fix clang warnings
Since 'port' is int32, use INT32_MAX and INT32_MIN instead of LONG_MAX and LONG_MIN. Signed-off-by: Dario Casalinuovo <[email protected]>
This commit is contained in:
committed by
Dario Casalinuovo
parent
7627095fb0
commit
fc1d8972ac
@@ -312,7 +312,7 @@ CDDBServer::_ParseAddress(const BString& cddbServer)
|
|||||||
char* firstInvalid;
|
char* firstInvalid;
|
||||||
errno = 0;
|
errno = 0;
|
||||||
port = strtol(portString.String(), &firstInvalid, 10);
|
port = strtol(portString.String(), &firstInvalid, 10);
|
||||||
if ((errno == ERANGE && (port == LONG_MAX || port == LONG_MIN))
|
if ((errno == ERANGE && (port == INT32_MAX || port == INT32_MIN))
|
||||||
|| (errno != 0 && port == 0)) {
|
|| (errno != 0 && port == 0)) {
|
||||||
return B_ERROR;
|
return B_ERROR;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user