resolv: Unify sockaddr union
Merge the following unions into a single union.
sockaddr_union
_sockaddr_union
res_sockaddr_union
Test: netd_{unit,integration}_test pass
Change-Id: I46685e7380dd25070ccd9eaf5387efde91cded8a
diff --git a/res_init.cpp b/res_init.cpp
index 05404cb..cfb6f08 100644
--- a/res_init.cpp
+++ b/res_init.cpp
@@ -135,7 +135,7 @@
int nserv = 0; /* number of nameserver records read from file */
int havesearch = 0;
int dots;
- union res_sockaddr_union u[2];
+ sockaddr_union u[2];
if ((statp->options & RES_INIT) != 0U) res_ndestroy(statp);
@@ -331,7 +331,7 @@
statp->_u._ext.ext = NULL;
}
-void res_setservers(res_state statp, const union res_sockaddr_union* set, int cnt) {
+void res_setservers(res_state statp, const sockaddr_union* set, int cnt) {
int i, nserv;
size_t size;
@@ -376,7 +376,7 @@
statp->nscount = nserv;
}
-int res_getservers(res_state statp, union res_sockaddr_union* set, int cnt) {
+int res_getservers(res_state statp, sockaddr_union* set, int cnt) {
int i;
size_t size;
uint16_t family;