diff options
author | Andreas Jaeger <aj@suse.de> | 2002-11-10 11:06:36 +0000 |
---|---|---|
committer | Andreas Jaeger <aj@suse.de> | 2002-11-10 11:06:36 +0000 |
commit | fb776f3ef3b2b7eaf7e92305b8b2dc480f31f3ff (patch) | |
tree | b6d3b7b6350601fbb8f6cbf8f820d25c0ab59cdb /inet/ether_ntoh.c | |
parent | 55c303acb873e478540042612f1028139454d4a4 (diff) | |
download | glibc-fb776f3ef3b2b7eaf7e92305b8b2dc480f31f3ff.tar glibc-fb776f3ef3b2b7eaf7e92305b8b2dc480f31f3ff.tar.gz glibc-fb776f3ef3b2b7eaf7e92305b8b2dc480f31f3ff.tar.bz2 glibc-fb776f3ef3b2b7eaf7e92305b8b2dc480f31f3ff.zip |
* nss/getXXent.c (GETFUNC_NAME): Use union type to avoid strict
aliasing problem.
* nss/getXXbyYY_r.c (INTERNAL): Likewise.
* nss/getnssent_r.c (__nss_getent_r): Likewise.
(__nss_setent): Likewise.
(__nss_getent_r): Likewise.
* inet/getnetgrent_r.c (innetgr): Likewise.
(__internal_setnetgrent_reuse): Likewise.
(internal_getnetgrent_r): Likewise.
* inet/ether_hton.c (ether_hostton): Likewise.
* inet/ether_ntoh.c (ether_ntohost): Likewise.
* sunrpc/netname.c (netname2user): Likewise.
* sunrpc/publickey.c (getpublickey): Likewise.
(getsecretkey): Likewise.
Diffstat (limited to 'inet/ether_ntoh.c')
-rw-r--r-- | inet/ether_ntoh.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/inet/ether_ntoh.c b/inet/ether_ntoh.c index ecddc9d8ac..ad4165cb3e 100644 --- a/inet/ether_ntoh.c +++ b/inet/ether_ntoh.c @@ -40,25 +40,29 @@ ether_ntohost (char *hostname, const struct ether_addr *addr) static service_user *startp; static lookup_function start_fct; service_user *nip; - lookup_function fct; + union + { + lookup_function f; + void *ptr; + } fct; int no_more; enum nss_status status = NSS_STATUS_UNAVAIL; struct etherent etherent; if (startp == NULL) { - no_more = __nss_ethers_lookup (&nip, "getntohost_r", (void **) &fct); + no_more = __nss_ethers_lookup (&nip, "getntohost_r", &fct.ptr); if (no_more) startp = (service_user *) -1; else { startp = nip; - start_fct = fct; + start_fct = fct.f; } } else { - fct = start_fct; + fct.f = start_fct; no_more = (nip = startp) == (service_user *) -1; } @@ -66,9 +70,9 @@ ether_ntohost (char *hostname, const struct ether_addr *addr) { char buffer[1024]; - status = (*fct) (addr, ðerent, buffer, sizeof buffer, &errno); + status = (*fct.f) (addr, ðerent, buffer, sizeof buffer, &errno); - no_more = __nss_next (&nip, "getntohost_r", (void **) &fct, status, 0); + no_more = __nss_next (&nip, "getntohost_r", &fct.ptr, status, 0); } if (status == NSS_STATUS_SUCCESS) |