| Index: native_client_sdk/src/libraries/nacl_io/socket/socket_node.cc
|
| diff --git a/native_client_sdk/src/libraries/nacl_io/socket/socket_node.cc b/native_client_sdk/src/libraries/nacl_io/socket/socket_node.cc
|
| index e296117b4836d16ed4801b34f7996e55a1f4fe9a..f246d24a2d1d90966ae29c3cee1c1695c1d1104a 100644
|
| --- a/native_client_sdk/src/libraries/nacl_io/socket/socket_node.cc
|
| +++ b/native_client_sdk/src/libraries/nacl_io/socket/socket_node.cc
|
| @@ -276,14 +276,14 @@ Error SocketNode::SetSockOpt(int lvl,
|
| // SO_REUSEADDR is effectivly always on since we can't
|
| // disable it with PPAPI sockets. Just return success
|
| // here regardless.
|
| - if (len < sizeof(int))
|
| + if (static_cast<size_t>(len) < sizeof(int))
|
| return EINVAL;
|
| return 0;
|
| }
|
| case SO_LINGER: {
|
| // Not supported by the PPAPI interface but we preserve
|
| // the settings and pretend to support it.
|
| - if (len < sizeof(struct linger))
|
| + if (static_cast<size_t>(len) < sizeof(struct linger))
|
| return EINVAL;
|
| struct linger new_linger = *static_cast<const linger*>(optval);
|
| // Don't allow setting linger to be enabled until we
|
| @@ -298,7 +298,7 @@ Error SocketNode::SetSockOpt(int lvl,
|
| case SO_KEEPALIVE: {
|
| // Not supported by the PPAPI interface but we preserve
|
| // the flag and pretend to support it.
|
| - if (len < sizeof(int))
|
| + if (static_cast<size_t>(len) < sizeof(int))
|
| return EINVAL;
|
| int value = *static_cast<const int*>(optval);
|
| keep_alive_ = value != 0;
|
|
|