Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(41)

Unified Diff: native_client_sdk/src/libraries/nacl_io/socket/socket_node.cc

Issue 176923017: [NaCl SDK] Compile for naclio for Bionic (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix build_sdk bugs Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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))
binji 2014/04/02 18:35:53 Might be nicer to do this once at the top of the f
noelallen1 2014/04/03 17:58:52 It's a different type, not size.
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;

Powered by Google App Engine
This is Rietveld 408576698