Skip to content

Commit

Permalink
Remove unused initialization code
Browse files Browse the repository at this point in the history
This code is not used any more and is triggering SELinux denial due to
attempting to access /proc/net/{ipv6_route,if_inet6}.

Further clean up of unused code will be done in a follow up patch.

Test: Build
Bug: 33250070
Change-Id: I52eac0ffea03857ca958e7ac296936b8dfa2092b
  • Loading branch information
kongy committed Dec 1, 2016
1 parent bb86d15 commit 3442abd
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion ojluni/src/main/native/net_util_md.c
Original file line number Diff line number Diff line change
Expand Up @@ -500,7 +500,9 @@ NET_AllocSockaddr(struct sockaddr **him, int *len) {
}
}

#if defined(__linux__) && defined(AF_INET6)
#if 0
// Android-changed: Stripped out unused code. http://b/33250070
// #if defined(__linux__) && defined(AF_INET6)


/* following code creates a list of addresses from the kernel
Expand Down Expand Up @@ -1398,9 +1400,12 @@ NET_Wait(JNIEnv *env, jint fd, jint flags, jint timeout)
return timeout;
}

#if 0
// Stripped out unused code.
// http://b/27301951
__attribute__((destructor))
static void netUtilCleanUp() {
if (loRoutes != 0) free(loRoutes);
if (localifs != 0) free(localifs);
}
#endif

0 comments on commit 3442abd

Please sign in to comment.