summaryrefslogtreecommitdiffstats
path: root/lib/libatm
diff options
context:
space:
mode:
authorarr <arr@FreeBSD.org>2002-06-24 22:29:01 +0000
committerarr <arr@FreeBSD.org>2002-06-24 22:29:01 +0000
commit1c28000a2297d886fa3e4fcc11a054df8dfb1a8e (patch)
tree2af95384ad05a705b0e060404b691bef105d8a59 /lib/libatm
parent3662a19b344f66039ab009e1b5c78dd1e8b49afc (diff)
downloadFreeBSD-src-1c28000a2297d886fa3e4fcc11a054df8dfb1a8e.zip
FreeBSD-src-1c28000a2297d886fa3e4fcc11a054df8dfb1a8e.tar.gz
- Remove UM_* memory handling macros as they just obfuscate code.
Diffstat (limited to 'lib/libatm')
-rw-r--r--lib/libatm/atm_addr.c2
-rw-r--r--lib/libatm/cache_key.c8
-rw-r--r--lib/libatm/ioctl_subr.c23
-rw-r--r--lib/libatm/ip_addr.c4
4 files changed, 18 insertions, 19 deletions
diff --git a/lib/libatm/atm_addr.c b/lib/libatm/atm_addr.c
index 79e787b..f92c4b13 100644
--- a/lib/libatm/atm_addr.c
+++ b/lib/libatm/atm_addr.c
@@ -237,7 +237,7 @@ format_atm_addr(addr)
/*
* Clear the returned string
*/
- UM_ZERO(str, sizeof(str));
+ bzero(str, sizeof(str));
strcpy(str, "-");
/*
diff --git a/lib/libatm/cache_key.c b/lib/libatm/cache_key.c
index be98b86..680f44a 100644
--- a/lib/libatm/cache_key.c
+++ b/lib/libatm/cache_key.c
@@ -79,7 +79,7 @@ scsp_cache_key(ap, ip, ol, op)
/*
* Initialize
*/
- UM_ZERO(buff, sizeof(buff));
+ bzero(buff, sizeof(buff));
/*
* Copy the addresses into a buffer for MD5 computation
@@ -87,8 +87,8 @@ scsp_cache_key(ap, ip, ol, op)
len = sizeof(struct in_addr) + ap->address_length;
if (len > sizeof(buff))
len = sizeof(buff);
- UM_COPY(ip, buff, sizeof(struct in_addr));
- UM_COPY(ap->address, &buff[sizeof(struct in_addr)],
+ bcopy(ip, buff, sizeof(struct in_addr));
+ bcopy(ap->address, &buff[sizeof(struct in_addr)],
len - sizeof(struct in_addr));
/*
@@ -101,7 +101,7 @@ scsp_cache_key(ap, ip, ol, op)
/*
* Fold the 16-byte digest to the required length
*/
- UM_ZERO((caddr_t)op, ol);
+ bzero((caddr_t)op, ol);
for (i = 0; i < 16; i++) {
op[i % ol] = op[i % ol] ^ digest[i];
}
diff --git a/lib/libatm/ioctl_subr.c b/lib/libatm/ioctl_subr.c
index 66dbfdb..08968d3 100644
--- a/lib/libatm/ioctl_subr.c
+++ b/lib/libatm/ioctl_subr.c
@@ -104,7 +104,7 @@ do_info_ioctl(req, buf_len)
* Get memory for returned information
*/
mem_retry:
- buf = (caddr_t)UM_ALLOC(buf_len);
+ buf = malloc(buf_len);
if (buf == NULL) {
errno = ENOMEM;
return(-1);
@@ -121,7 +121,7 @@ mem_retry:
*/
rc = ioctl(s, AIOCINFO, (caddr_t)req);
if (rc) {
- UM_FREE(buf);
+ free(buf);
if (errno == ENOSPC) {
buf_len = buf_len * 2;
goto mem_retry;
@@ -162,7 +162,7 @@ get_vcc_info(intf, vccp)
* Initialize IOCTL request
*/
air.air_opcode = AIOCS_INF_VCC;
- UM_ZERO(air.air_vcc_intf, sizeof(air.air_vcc_intf));
+ bzero(air.air_vcc_intf, sizeof(air.air_vcc_intf));
if (intf != NULL && strlen(intf) != 0)
strcpy(air.air_vcc_intf, intf);
@@ -215,7 +215,7 @@ get_subnet_mask(intf, mask)
/*
* Set up and issue the IOCTL
*/
- UM_ZERO(&req, sizeof(req));
+ bzero(&req, sizeof(req));
strcpy(req.ifr_name, intf);
rc = ioctl(s, SIOCGIFNETMASK, (caddr_t)&req);
(void)close(s);
@@ -269,7 +269,7 @@ get_mtu(intf)
/*
* Set up and issue the IOCTL
*/
- UM_ZERO(&req, sizeof(req));
+ bzero(&req, sizeof(req));
strcpy(req.ifr_name, intf);
rc = ioctl(s, SIOCGIFMTU, (caddr_t)&req);
(void)close(s);
@@ -326,8 +326,7 @@ verify_nif_name(name)
/*
* Get memory for returned information
*/
- nif_info = (struct air_netif_rsp *)UM_ALLOC(
- sizeof(struct air_netif_rsp));
+ nif_info = malloc(sizeof(struct air_netif_rsp));
if (nif_info == NULL) {
errno = ENOMEM;
return(-1);
@@ -339,14 +338,14 @@ verify_nif_name(name)
air.air_opcode = AIOCS_INF_NIF;
air.air_buf_addr = (caddr_t)nif_info;
air.air_buf_len = sizeof(struct air_netif_rsp);
- UM_ZERO(air.air_netif_intf, sizeof(air.air_netif_intf));
+ bzero(air.air_netif_intf, sizeof(air.air_netif_intf));
strcpy(air.air_netif_intf, name);
/*
* Issue the IOCTL
*/
rc = ioctl(s, AIOCINFO, (caddr_t)&air);
- UM_FREE(nif_info);
+ free(nif_info);
(void)close(s);
/*
@@ -382,7 +381,7 @@ get_cfg_info ( intf, cfgp )
* Initialize IOCTL request
*/
air.air_opcode = AIOCS_INF_CFG;
- UM_ZERO ( air.air_cfg_intf, sizeof(air.air_cfg_intf));
+ bzero ( air.air_cfg_intf, sizeof(air.air_cfg_intf));
if ( intf != NULL && strlen(intf) != 0 )
strcpy ( air.air_cfg_intf, intf );
@@ -420,7 +419,7 @@ get_intf_info ( intf, intp )
* Initialize IOCTL request
*/
air.air_opcode = AIOCS_INF_INT;
- UM_ZERO ( air.air_int_intf, sizeof(air.air_int_intf));
+ bzero ( air.air_int_intf, sizeof(air.air_int_intf));
if ( intf != NULL && strlen(intf) != 0 )
strcpy ( air.air_int_intf, intf );
@@ -459,7 +458,7 @@ get_netif_info ( intf, netp )
* Initialize IOCTL request
*/
air.air_opcode = AIOCS_INF_NIF;
- UM_ZERO ( air.air_int_intf, sizeof(air.air_int_intf) );
+ bzero ( air.air_int_intf, sizeof(air.air_int_intf) );
if ( intf != NULL && strlen(intf) != 0 )
strcpy ( air.air_int_intf, intf );
diff --git a/lib/libatm/ip_addr.c b/lib/libatm/ip_addr.c
index 5c023f4..23288a8 100644
--- a/lib/libatm/ip_addr.c
+++ b/lib/libatm/ip_addr.c
@@ -78,7 +78,7 @@ get_ip_addr(p)
/*
* Get IP address of specified host name
*/
- UM_ZERO(&sin, sizeof(sin));
+ bzero(&sin, sizeof(sin));
sin.sin_family = AF_INET;
if (p[0] >= '0' && p[0] <= '9') {
/*
@@ -126,7 +126,7 @@ format_ip_addr(addr)
/*
* Initialize
*/
- UM_ZERO(host_name, sizeof(host_name));
+ bzero(host_name, sizeof(host_name));
/*
* Check for a zero address
OpenPOWER on IntegriCloud