OSDN Git Service

Replace a use of index with strchr.
authorCarl Shapiro <cshapiro@google.com>
Tue, 16 Mar 2010 22:18:53 +0000 (15:18 -0700)
committerCarl Shapiro <cshapiro@google.com>
Tue, 16 Mar 2010 22:18:53 +0000 (15:18 -0700)
Change-Id: I2c1238bc1bd0945533712d0d74a761721b8408a3

libcore/luni/src/main/native/org_apache_harmony_luni_platform_OSNetworkSystem.cpp

index 12c3dd9..4680ca6 100644 (file)
@@ -493,7 +493,7 @@ static jbyteArray osNetworkSystem_ipStringToByteArray(JNIEnv* env, jclass,
 
     // Accept IPv6 addresses (only) in square brackets for compatibility.
     if (ipString[0] == '[' && ipString[byteCount - 1] == ']' &&
-            index(ipString, ':') != NULL) {
+            strchr(ipString, ':') != NULL) {
         memmove(ipString, ipString + 1, byteCount - 2);
         ipString[byteCount - 2] = '\0';
     }