aboutsummaryrefslogtreecommitdiff
path: root/src/script.cpp
diff options
context:
space:
mode:
authorGiel van Schijndel <me@mortis.eu>2011-06-24 20:09:24 +0200
committerGiel van Schijndel <me@mortis.eu>2011-07-13 05:07:44 +0200
commitd7f1d200ab5d385c727261621c069dfbc6170e78 (patch)
tree3b2eff1191b8423f36540065d2a84c178d77e6cd /src/script.cpp
parentf85c0974492d9c779d45112fc943f0dbe0b95cda (diff)
fix warning: comparison of unsigned expression < 0 is always false [-Wtautological-compare]
Don't check for a negative parameter count, because not only will it never happen, it doesn't make any sense either. Invalid sockets (as returned by socket(2)) are always exactly -1 (not just negative as negative file descriptors are technically not prohibited by POSIX) on POSIX systems. Since we store them in SOCKET (unsigned int), however, that really is ~0U (or MAX_UINT) which happens to be what INVALID_SOCKET is already defined to, so an additional check for being negative is not only unnecessary (unsigned integers aren't *ever* negative) its redundant as well (the INVALID_SOCKET comparison is enough). Signed-off-by: Giel van Schijndel <me@mortis.eu>
Diffstat (limited to 'src/script.cpp')
0 files changed, 0 insertions, 0 deletions