substitute obsolete function calls(bzero/index)
This commit is contained in:
committed by
Andreas Steffen
parent
50fb724ddd
commit
45e962edef
@@ -414,7 +414,7 @@ struct alg_info_esp *alg_info_esp_create_from_str(char *alg_str)
|
||||
alg_info_esp = malloc_thing (struct alg_info_esp);
|
||||
zero(alg_info_esp);
|
||||
|
||||
pfs_name=index (alg_str, ';');
|
||||
pfs_name=strchr(alg_str, ';');
|
||||
if (pfs_name)
|
||||
{
|
||||
memcpy(esp_buf, alg_str, pfs_name-alg_str);
|
||||
|
||||
@@ -56,7 +56,7 @@ get_defaultroute(defaultroute_t *defaultroute)
|
||||
ssize_t msglen;
|
||||
int fd;
|
||||
|
||||
bzero(&rtu, sizeof(rtu));
|
||||
memset(&rtu, 0, sizeof(rtu));
|
||||
rtu.m.nh.nlmsg_len = NLMSG_LENGTH(sizeof(rtu.m.rt));
|
||||
rtu.m.nh.nlmsg_flags = NLM_F_REQUEST | NLM_F_DUMP;
|
||||
rtu.m.nh.nlmsg_type = RTM_GETROUTE;
|
||||
@@ -142,7 +142,7 @@ get_defaultroute(defaultroute_t *defaultroute)
|
||||
plog("could not open AF_INET socket");
|
||||
break;
|
||||
}
|
||||
bzero(&req, sizeof(req));
|
||||
memset(&req, 0, sizeof(req));
|
||||
req.ifr_ifindex = iface_idx;
|
||||
if (ioctl(fd, SIOCGIFNAME, &req) < 0 ||
|
||||
ioctl(fd, SIOCGIFADDR, &req) < 0)
|
||||
|
||||
Reference in New Issue
Block a user