[Lldb-commits] [PATCH] Add Socket::Get[Remote/Local]IpAddress and unit tests

Oleksiy Vyalov ovyalov at google.com
Mon Jan 12 10:55:34 PST 2015


Minor comments.


REPOSITORY
  rL LLVM

================
Comment at: source/Host/common/Socket.cpp:536
@@ -538,1 +535,3 @@
+            port = ::strtoul (port_str.c_str(), nullptr, 10);
+            if (port < 65536)
             {
----------------
s/65536/UINT16_MAX?

================
Comment at: source/Host/common/SocketAddress.cpp:44
@@ +43,3 @@
+        {
+            const char* formatted = inet_ntoa(*static_cast<const in_addr*>(src));
+            if (strlen(formatted) < size)
----------------
Could you check here for returned null value?

================
Comment at: source/Host/common/SocketAddress.cpp:68
@@ +67,3 @@
+        }
+            return nullptr;
+    }
----------------
indentation.

http://reviews.llvm.org/D6917

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the lldb-commits mailing list