X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ian/git?p=secnet.git;a=blobdiff_plain;f=netlink.c;h=601686425124cb7d7bb46cb03500f9df75e7c909;hp=07c1468488ad42235ad37457fbec903059159dcb;hb=23ca153790f68d03191eaa9ac306597da596b4ed;hpb=4f28e77ed21e75fcfb30e2f8d1d2b9b1657f44c6 diff --git a/netlink.c b/netlink.c index 07c1468..6016864 100644 --- a/netlink.c +++ b/netlink.c @@ -386,7 +386,7 @@ static uint16_t netlink_icmp_reply_len(struct buffer_if *buf) /* We include the first 8 bytes of the packet data, provided they exist */ hlen+=8; plen=ntohs(iph->tot_len); - return (hlen>plen?plen:hlen); + return MIN(hlen,plen); } /* client indicates where the packet we're constructing a response to @@ -976,7 +976,6 @@ static void netlink_output_subnets(struct netlink *st, uint32_t loglevel, for (i=0; ientries; i++) { net=subnet_to_string(snets->list[i]); Message(loglevel,"%s ",net); - free(net); } } @@ -1014,7 +1013,6 @@ static void netlink_dump_routes(struct netlink *st, bool_t requested) for (i=0; isubnets->entries; i++) { net=subnet_to_string(st->subnets->list[i]); Message(c,"%s ",net); - free(net); } if (i>0) Message(c,"-> host (use %d)\n",st->outcount);