Skip to content

Commit

Permalink
cddb_server.cpp: fix clang warnings
Browse files Browse the repository at this point in the history
Since 'port' is int32, use INT32_MAX and INT32_MIN
instead of LONG_MAX and LONG_MIN.

Signed-off-by: Dario Casalinuovo <b.vitruvio@gmail.com>
  • Loading branch information
mt819 authored and Numerio committed Jun 27, 2016
1 parent 7627095 commit fc1d897
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/bin/cddb_lookup/cddb_server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ CDDBServer::_ParseAddress(const BString& cddbServer)
char* firstInvalid;
errno = 0;
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)) {
return B_ERROR;
}
Expand Down

0 comments on commit fc1d897

Please sign in to comment.