remove useless casts (type*) xzalloc(...)

This commit is contained in:
Denis Vlasenko
2006-12-22 18:37:07 +00:00
parent a6df5907d2
commit 4cccc03768
7 changed files with 13 additions and 16 deletions

View File

@@ -1118,7 +1118,7 @@ traceroute_main(int argc, char *argv[])
xsetgid(getgid());
xsetuid(getuid());
outip = (struct ip *)xzalloc(packlen);
outip = xzalloc(packlen);
outip->ip_v = IPVERSION;
if (tos_str)
@@ -1133,7 +1133,6 @@ traceroute_main(int argc, char *argv[])
#if ENABLE_FEATURE_TRACEROUTE_USE_ICMP
if (useicmp) {
outip->ip_p = IPPROTO_ICMP;
outicmp = (struct icmp *)outp;
outicmp->icmp_type = ICMP_ECHO;
outicmp->icmp_id = htons(ident);
@@ -1142,7 +1141,6 @@ traceroute_main(int argc, char *argv[])
#endif
{
outip->ip_p = IPPROTO_UDP;
outudp = (struct udphdr *)outp;
outudp->source = htons(ident);
outudp->len = htons((uint16_t)(packlen - (sizeof(*outip) + optlen)));