From e1ff7f23f852545fc959bfc5f5a158938af54ac5 Mon Sep 17 00:00:00 2001 From: jkh Date: Thu, 5 Dec 1996 18:46:19 +0000 Subject: 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! --- lib/libc/net/ether_addr.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'lib/libc') 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); -- cgit v1.1