summaryrefslogtreecommitdiff
path: root/nss/ether_hton.c
diff options
context:
space:
mode:
Diffstat (limited to 'nss/ether_hton.c')
-rw-r--r--nss/ether_hton.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/nss/ether_hton.c b/nss/ether_hton.c
index 588828cc1e..3c5b25c537 100644
--- a/nss/ether_hton.c
+++ b/nss/ether_hton.c
@@ -30,24 +30,21 @@ int
ether_hostton (const char *hostname, struct ether_addr *addr)
{
nss_action_list nip;
- union
- {
- lookup_function f;
- void *ptr;
- } fct;
+ void *fct;
int no_more;
enum nss_status status = NSS_STATUS_UNAVAIL;
struct etherent etherent;
- no_more = __nss_ethers_lookup2 (&nip, "gethostton_r", NULL, &fct.ptr);
+ no_more = __nss_ethers_lookup2 (&nip, "gethostton_r", NULL, &fct);
while (no_more == 0)
{
char buffer[1024];
- status = (*fct.f) (hostname, &etherent, buffer, sizeof buffer, &errno);
+ status = ((lookup_function) fct) (hostname, &etherent, buffer,
+ sizeof buffer, &errno);
- no_more = __nss_next2 (&nip, "gethostton_r", NULL, &fct.ptr, status, 0);
+ no_more = __nss_next2 (&nip, "gethostton_r", NULL, &fct, status, 0);
}
if (status == NSS_STATUS_SUCCESS)