diff options
author | jkh <jkh@FreeBSD.org> | 1996-12-05 18:46:19 +0000 |
---|---|---|
committer | jkh <jkh@FreeBSD.org> | 1996-12-05 18:46:19 +0000 |
commit | e1ff7f23f852545fc959bfc5f5a158938af54ac5 (patch) | |
tree | 087fa6d6932a7f9b9498c321700486a0d8bf5b49 /lib/libc/net | |
parent | 387fe043cb29876f6215a04438bcb1ecb12e7f52 (diff) | |
download | FreeBSD-src-e1ff7f23f852545fc959bfc5f5a158938af54ac5.zip FreeBSD-src-e1ff7f23f852545fc959bfc5f5a158938af54ac5.tar.gz |
Remove more instances of passing arrays by address when they should
have simply been passed as arrays. In some cases, casts had even
been added to remove the warnings generated by such misuse! Aieee!
Diffstat (limited to 'lib/libc/net')
-rw-r--r-- | lib/libc/net/ether_addr.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/libc/net/ether_addr.c b/lib/libc/net/ether_addr.c index 2d2101d..2c3893b 100644 --- a/lib/libc/net/ether_addr.c +++ b/lib/libc/net/ether_addr.c @@ -35,7 +35,7 @@ * Center for Telecommunications Research * Columbia University, New York City * - * $Id: ether_addr.c,v 1.3 1996/03/16 21:25:59 wpaul Exp $ + * $Id: ether_addr.c,v 1.4 1996/07/12 18:54:31 jkh Exp $ */ @@ -158,15 +158,15 @@ int ether_ntohost(hostname, e) strlen(ether_a), &result, &resultlen)) { continue; } - strncpy((char *)&buf, result, resultlen); + strncpy(buf, result, resultlen); free(result); } #endif - if (!ether_line(&buf, &local_ether, &local_host)) { + if (!ether_line(buf, &local_ether, local_host)) { if (!bcmp((char *)&local_ether.octet[0], (char *)&e->octet[0], 6)) { /* We have a match */ - strcpy(hostname, (char *)&local_host); + strcpy(hostname, local_host); fclose(fp); return(0); } @@ -207,12 +207,12 @@ int ether_hostton(hostname, e) strlen(hostname), &result, &resultlen)) { continue; } - strncpy((char *)&buf, result, resultlen); + strncpy(buf, result, resultlen); free(result); } #endif - if (!ether_line(&buf, &local_ether, &local_host)) { - if (!strcmp(hostname, (char *)&local_host)) { + if (!ether_line(buf, &local_ether, local_host)) { + if (!strcmp(hostname, local_host)) { /* We have a match */ bcopy((char *)&local_ether.octet[0], (char *)&e->octet[0], 6); |