From ddf9ef103e0a611c9a01425a28baf8a612b0d114 Mon Sep 17 00:00:00 2001 From: dillon Date: Sun, 12 Jan 2003 01:37:13 +0000 Subject: Change struct file f_data to un_data, a union of the correct struct pointer types, and remove a huge number of casts from code using it. Change struct xfile xf_data to xun_data (ABI is still compatible). If we need to add a #define for f_data and xf_data we can, but I don't think it will be necessary. There are no operational changes in this commit. --- contrib/ipfilter/ipsend/sock.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'contrib/ipfilter') diff --git a/contrib/ipfilter/ipsend/sock.c b/contrib/ipfilter/ipsend/sock.c index 46a399a..cb9dba8 100644 --- a/contrib/ipfilter/ipsend/sock.c +++ b/contrib/ipfilter/ipsend/sock.c @@ -222,7 +222,7 @@ struct tcpiphdr *ti; } s = (struct socket *)calloc(1, sizeof(*s)); - if (KMCPY(s, f->f_data, sizeof(*s)) == -1) + if (KMCPY(s, f->un_data.socket, sizeof(*s)) == -1) { fprintf(stderr, "read(%#x,%#x,%d) - f_data - failed\n", o[fd], s, sizeof(*s)); @@ -316,10 +316,11 @@ struct tcpiphdr *ti; } s = (struct socket *)calloc(1, sizeof(*s)); - if (KMCPY(s, f->f_data, sizeof(*s)) == -1) + if (KMCPY(s, f->un_data.socket, sizeof(*s)) == -1) { fprintf(stderr, "read(%#lx,%#lx,%lu) - f_data - failed\n", - (u_long)f->f_data, (u_long)s, (u_long)sizeof(*s)); + (u_long)f->un_data.socket, (u_long)s, + (u_long)sizeof(*s)); return NULL; } -- cgit v1.1