diff --git a/sbin/atm/atm/atm.c b/sbin/atm/atm/atm.c index 4be5a1125157..35666603523d 100644 --- a/sbin/atm/atm/atm.c +++ b/sbin/atm/atm/atm.c @@ -565,7 +565,7 @@ pvc_add(argc, argv, cmdp) fprintf(stderr, "%s: Illegal interface name\n", prog); exit(1); } - UM_ZERO(air.air_int_intf, sizeof(air.air_int_intf)); + bzero(air.air_int_intf, sizeof(air.air_int_intf)); strcpy(air.air_int_intf, argv[0]); buf_len = sizeof(struct air_int_rsp); air.air_opcode = AIOCS_INF_INT; @@ -737,7 +737,7 @@ arp_add(argc, argv, cmdp) /* * Initialize add request structure */ - UM_ZERO(&apr, sizeof(apr)); + bzero(&apr, sizeof(apr)); /* * Get network interface name if one is present @@ -751,7 +751,7 @@ arp_add(argc, argv, cmdp) /* * Get IP address of specified host name */ - UM_ZERO(&host_ip, sizeof(host_ip)); + bzero(&host_ip, sizeof(host_ip)); host_ip.sa.sa_family = AF_INET; sin = get_ip_addr(argv[0]); host_ip.sin.sin_addr.s_addr = sin->sin_addr.s_addr; @@ -1004,7 +1004,7 @@ arp_dlt(argc, argv, cmdp) /* * Set opcode */ - UM_ZERO(&apr, sizeof(apr)); + bzero(&apr, sizeof(apr)); apr.adr_opcode = AIOCS_DEL_ARP; /* @@ -1019,7 +1019,7 @@ arp_dlt(argc, argv, cmdp) /* * Get IP address of specified host name */ - UM_ZERO(&host_addr, sizeof(host_addr)); + bzero(&host_addr, sizeof(host_addr)); host_addr.sa.sa_family = AF_INET; sin = get_ip_addr(argv[0]); host_addr.sin.sin_addr.s_addr = sin->sin_addr.s_addr; diff --git a/sbin/atm/atm/atm_eni.c b/sbin/atm/atm/atm_eni.c index 0f9f8210b55d..8b0627ac8ddc 100644 --- a/sbin/atm/atm/atm_eni.c +++ b/sbin/atm/atm/atm_eni.c @@ -156,7 +156,7 @@ show_eni_stats(intf, argc, argv) /* * Get vendor-specific statistics from the kernel */ - UM_ZERO(&air, sizeof(air)); + bzero(&air, sizeof(air)); air.air_opcode = AIOCS_INF_VST; strcpy(air.air_vinfo_intf, intf); buf_len = do_info_ioctl(&air, sizeof(struct air_vinfo_rsp) + 1024); @@ -184,7 +184,7 @@ show_eni_stats(intf, argc, argv) */ if (buf_len < sizeof(struct air_vinfo_rsp) + sizeof(Eni_stats)) { - UM_FREE(stats); + free(stats); return; } @@ -206,7 +206,7 @@ show_eni_stats(intf, argc, argv) break; } - UM_FREE(stats); + free(stats); } diff --git a/sbin/atm/atm/atm_fore200.c b/sbin/atm/atm/atm_fore200.c index 27dfedb18dd7..4e8210438756 100644 --- a/sbin/atm/atm/atm_fore200.c +++ b/sbin/atm/atm/atm_fore200.c @@ -174,7 +174,7 @@ show_fore200_stats(intf, argc, argv) /* * Get adapter configuration from the kernel */ - UM_ZERO(&air, sizeof(air)); + bzero(&air, sizeof(air)); air.air_opcode = AIOCS_INF_CFG; strcpy(air.air_cfg_intf, intf); buf_len = do_info_ioctl(&air, sizeof(struct air_cfg_rsp)); @@ -200,7 +200,7 @@ show_fore200_stats(intf, argc, argv) /* * Get vendor-specific statistics from the kernel */ - UM_ZERO(&air, sizeof(air)); + bzero(&air, sizeof(air)); air.air_opcode = AIOCS_INF_VST; strcpy(air.air_vinfo_intf, intf); buf_len = do_info_ioctl(&air, sizeof(struct air_vinfo_rsp) + 1024); @@ -228,8 +228,8 @@ show_fore200_stats(intf, argc, argv) */ if (buf_len < sizeof(struct air_vinfo_rsp) + sizeof(Fore_stats)) { - UM_FREE(stats); - UM_FREE(cfg); + free(stats); + free(cfg); return; } @@ -269,8 +269,8 @@ show_fore200_stats(intf, argc, argv) break; } - UM_FREE(stats); - UM_FREE(cfg); + free(stats); + free(cfg); } diff --git a/sbin/atm/atm/atm_inet.c b/sbin/atm/atm/atm_inet.c index 78f3c684f1c0..cc80e0c8dc02 100644 --- a/sbin/atm/atm/atm_inet.c +++ b/sbin/atm/atm/atm_inet.c @@ -108,7 +108,7 @@ ip_pvcadd(argc, argv, cmdp, app, intp) /* * Validate and set network interface */ - UM_ZERO(app->aar_pvc_intf, sizeof(app->aar_pvc_intf)); + bzero(app->aar_pvc_intf, sizeof(app->aar_pvc_intf)); netif_pref_len = strlen(intp->anp_nif_pref); cp = &argv[0][netif_pref_len]; netif_no = atoi(cp); @@ -139,7 +139,7 @@ ip_pvcadd(argc, argv, cmdp, app, intp) /* * Set PVC destination address */ - UM_ZERO(&app->aar_pvc_dst, sizeof(struct sockaddr)); + bzero(&app->aar_pvc_dst, sizeof(struct sockaddr)); if (strcasecmp(argv[0], "dynamic") == 0 || strcasecmp(argv[0], "dyn") == 0) { diff --git a/sbin/atm/atm/atm_print.c b/sbin/atm/atm/atm_print.c index e02e9d14a2b1..2992cdf3442a 100644 --- a/sbin/atm/atm/atm_print.c +++ b/sbin/atm/atm/atm_print.c @@ -290,7 +290,7 @@ print_arp_info(ai) /* * Decode the flags */ - UM_ZERO(flags, sizeof(flags)); + bzero(flags, sizeof(flags)); if (ai->aap_flags & ARPF_VALID) { strcat(flags, "V"); } @@ -313,7 +313,7 @@ print_arp_info(ai) /* * Format the age */ - UM_ZERO(age, sizeof(age)); + bzero(age, sizeof(age)); if (!(ai->aap_flags & ARPF_VALID)) { strcpy(age, "-"); } else { @@ -511,7 +511,7 @@ print_intf_info(ni) /* * Get the range of NIFs on the physical interface */ - UM_ZERO(nif_names, sizeof(nif_names)); + bzero(nif_names, sizeof(nif_names)); if (strlen(ni->anp_nif_pref) == 0) { strcpy(nif_names, "-"); } else { @@ -583,7 +583,7 @@ print_ip_vcc_info(ai) /* * Decode VCC flags */ - UM_ZERO(flags, sizeof(flags)); + bzero(flags, sizeof(flags)); if (ai->aip_flags & IVF_PVC) { strcat(flags, "P"); } @@ -797,7 +797,7 @@ print_vcc_info(vi) /* * Translate VCC direction */ - UM_ZERO(dir_name, sizeof(dir_name)); + bzero(dir_name, sizeof(dir_name)); if (vi->avp_type & VCC_IN) strcat(dir_name, "In"); if (vi->avp_type & VCC_OUT) diff --git a/sbin/atm/atm/atm_set.c b/sbin/atm/atm/atm_set.c index 2e3a18fef304..c637827827cb 100644 --- a/sbin/atm/atm/atm_set.c +++ b/sbin/atm/atm/atm_set.c @@ -105,7 +105,7 @@ set_arpserver(argc, argv, cmdp) /* * Get the ARP server's ATM address */ - UM_ZERO(&server, sizeof(server)); + bzero(&server, sizeof(server)); if (strcasecmp(argv[0], "local")) { /* * ARP server NSAP address is provided @@ -142,7 +142,7 @@ set_arpserver(argc, argv, cmdp) * list of permitted LIS prefixes. */ len = sizeof(struct air_netif_rsp); - UM_ZERO(&air, sizeof(air)); + bzero(&air, sizeof(air)); air.air_opcode = AIOCS_INF_NIF; strcpy(air.air_int_intf, intf); len = do_info_ioctl(&air, len); @@ -166,7 +166,7 @@ set_arpserver(argc, argv, cmdp) int_info = (struct air_netif_rsp *) air.air_buf_addr; lis = (struct sockaddr_in *)&int_info->anp_proto_addr; prefix_buf[0].ip_addr = lis->sin_addr; - UM_FREE(int_info); + free(int_info); rc = get_subnet_mask(intf, &if_mask); if (rc) { @@ -200,7 +200,7 @@ set_arpserver(argc, argv, cmdp) /* * Build ioctl request */ - UM_ZERO(&asr, sizeof(asr)); + bzero(&asr, sizeof(asr)); asr.asr_opcode = AIOCS_SET_ASV; strncpy(asr.asr_arp_intf, intf, sizeof(asr.asr_arp_intf)); asr.asr_arp_addr = server; @@ -310,7 +310,7 @@ set_macaddr(argc, argv, cmdp) */ asr.asr_opcode = AIOCS_SET_MAC; strncpy(asr.asr_mac_intf, intf, sizeof(asr.asr_mac_intf)); - UM_COPY(&mac, &asr.asr_mac_addr, sizeof(asr.asr_mac_addr)); + bcopy(&mac, &asr.asr_mac_addr, sizeof(asr.asr_mac_addr)); /* * Pass the new address to the kernel @@ -494,7 +494,7 @@ set_prefix(argc, argv, cmdp) */ asr.asr_opcode = AIOCS_SET_PRF; strncpy(asr.asr_prf_intf, intf, sizeof(asr.asr_prf_intf)); - UM_COPY(prefix, asr.asr_prf_pref, sizeof(asr.asr_prf_pref)); + bcopy(prefix, asr.asr_prf_pref, sizeof(asr.asr_prf_pref)); /* * Pass the new prefix to the kernel diff --git a/sbin/atm/atm/atm_show.c b/sbin/atm/atm/atm_show.c index 0e115e18f6ed..10db673ce5a7 100644 --- a/sbin/atm/atm/atm_show.c +++ b/sbin/atm/atm/atm_show.c @@ -101,7 +101,7 @@ show_arp(argc, argv, cmdp) /* * Get IP address of specified host name */ - UM_ZERO(&host_addr, sizeof(host_addr)); + bzero(&host_addr, sizeof(host_addr)); host_addr.sa.sa_family = AF_INET; if (argc) { sin = get_ip_addr(argv[0]); @@ -118,7 +118,7 @@ show_arp(argc, argv, cmdp) /* * Get ARP information from the kernel */ - UM_ZERO(&air, sizeof(air)); + bzero(&air, sizeof(air)); buf_len = sizeof(struct air_arp_rsp) * 10; air.air_opcode = AIOCS_INF_ARP; air.air_arp_addr = host_addr.sa; @@ -162,7 +162,7 @@ show_arp(argc, argv, cmdp) /* * Release the information from the kernel */ - UM_FREE(arp_info_base); + free(arp_info_base); } @@ -194,7 +194,7 @@ show_arpserv(argc, argv, cmdp) /* * Validate interface name */ - UM_ZERO(air.air_int_intf, sizeof(air.air_int_intf)); + bzero(air.air_int_intf, sizeof(air.air_int_intf)); if (argc) { if (strlen(argv[0]) > IFNAMSIZ - 1) { fprintf(stderr, "%s: Illegal interface name\n", @@ -242,7 +242,7 @@ show_arpserv(argc, argv, cmdp) asrv_info->asp_nprefix * sizeof(struct in_addr) * 2; } - UM_FREE(asrv_info_base); + free(asrv_info_base); } @@ -274,7 +274,7 @@ show_config(argc, argv, cmdp) /* * Validate interface name */ - UM_ZERO(air.air_cfg_intf, sizeof(air.air_cfg_intf)); + bzero(air.air_cfg_intf, sizeof(air.air_cfg_intf)); if (argc) { if (strlen(argv[0]) > IFNAMSIZ - 1) { fprintf(stderr, "%s: Illegal interface name\n", @@ -317,7 +317,7 @@ show_config(argc, argv, cmdp) buf_len -= sizeof(struct air_cfg_rsp)) { print_cfg_info(cfg_info); } - UM_FREE(cfg_info_base); + free(cfg_info_base); } @@ -349,7 +349,7 @@ show_intf(argc, argv, cmdp) /* * Validate interface name */ - UM_ZERO(&air, sizeof(air)); + bzero(&air, sizeof(air)); if (argc) { if (strlen(argv[0]) > IFNAMSIZ - 1) { fprintf(stderr, "%s: Illegal interface name\n", @@ -392,7 +392,7 @@ show_intf(argc, argv, cmdp) buf_len -= sizeof(struct air_int_rsp)) { print_intf_info(int_info); } - UM_FREE(int_info_base); + free(int_info_base); } @@ -431,7 +431,7 @@ show_ip_vcc(argc, argv, cmdp) * First parameter can be a netif name, an IP host name, or * an IP address. Figure out which it is. */ - UM_ZERO(&host_addr, sizeof(host_addr)); + bzero(&host_addr, sizeof(host_addr)); host_addr.sa.sa_family = AF_INET; if (argc) { rc = verify_nif_name(argv[0]); @@ -519,7 +519,7 @@ show_ip_vcc(argc, argv, cmdp) /* * Release the information from the kernel */ - UM_FREE(ip_info_base); + free(ip_info_base); } @@ -552,7 +552,7 @@ show_netif(argc, argv, cmdp) /* * Validate network interface name */ - UM_ZERO(air.air_int_intf, sizeof(air.air_int_intf)); + bzero(air.air_int_intf, sizeof(air.air_int_intf)); if (argc) { if (strlen(argv[0]) > IFNAMSIZ - 1) { fprintf(stderr, "%s: Illegal interface name\n", prog); @@ -594,7 +594,7 @@ show_netif(argc, argv, cmdp) buf_len -= sizeof(struct air_netif_rsp)) { print_netif_info(int_info); } - UM_FREE(int_info_base); + free(int_info_base); } @@ -628,7 +628,7 @@ show_intf_stats(argc, argv, cmdp) /* * Validate interface name */ - UM_ZERO(intf, sizeof(intf)); + bzero(intf, sizeof(intf)); if (argc) { if (strlen(argv[0]) > IFNAMSIZ - 1) { fprintf(stderr, "%s: Illegal interface name\n", @@ -686,7 +686,7 @@ show_intf_stats(argc, argv, cmdp) break; } - UM_FREE(cfg_info); + free(cfg_info); } else { /* * Get generic interface statistics @@ -723,7 +723,7 @@ show_intf_stats(argc, argv, cmdp) buf_len-=sizeof(struct air_phy_stat_rsp)) { print_intf_stats(pstat_info); } - UM_FREE((caddr_t)pstat_info_base); + free((caddr_t)pstat_info_base); } } @@ -836,7 +836,7 @@ show_vcc_stats(argc, argv, cmdp) continue; print_vcc_stats(vcc_info); } - UM_FREE(vcc_info_base); + free(vcc_info_base); } @@ -959,7 +959,7 @@ show_vcc(argc, argv, cmdp) continue; print_vcc_info(vcc_info); } - UM_FREE(vcc_info_base); + free(vcc_info_base); } @@ -1019,7 +1019,7 @@ show_version(argc, argv, cmdp) buf_len -= sizeof(struct air_version_rsp)) { print_version_info(ver_info); } - UM_FREE(ver_info_base); + free(ver_info_base); } diff --git a/sbin/atm/atm/atm_subr.c b/sbin/atm/atm/atm_subr.c index ee1726b8f3c2..717cb6d5670b 100644 --- a/sbin/atm/atm/atm_subr.c +++ b/sbin/atm/atm/atm_subr.c @@ -243,8 +243,8 @@ get_adapter_name(intf) /* * Initialize */ - UM_ZERO(&air, sizeof(air)); - UM_ZERO(name, sizeof(name)); + bzero(&air, sizeof(air)); + bzero(name, sizeof(name)); /* * Get configuration information from the kernel @@ -263,7 +263,7 @@ get_adapter_name(intf) strcat(name, " "); strcat(name, get_adapter(cfg->acp_device)); - UM_FREE(cfg); + free(cfg); return(name); } @@ -294,7 +294,7 @@ format_mac_addr(addr) /* * Clear the returned string */ - UM_ZERO(str, sizeof(str)); + bzero(str, sizeof(str)); /* * Format the address