summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbde <bde@FreeBSD.org>1999-08-24 00:48:19 +0000
committerbde <bde@FreeBSD.org>1999-08-24 00:48:19 +0000
commitc832c03c3c4b357f9ff6827351df1e89d60a083c (patch)
tree513b90f3c8c91ec09ab4e95dc0005a6d496a980e
parentb01c8d2acc506c4737e1d158573e68ce3baa29aa (diff)
downloadFreeBSD-src-c832c03c3c4b357f9ff6827351df1e89d60a083c.zip
FreeBSD-src-c832c03c3c4b357f9ff6827351df1e89d60a083c.tar.gz
Cast pointers to [u]intptr_t instead of casting them to [u_]long. Don't
depend on gcc's feature of casting lvalues, especially for direct assignment where it doesn't even simplify the syntax. Cosmetic.
-rw-r--r--sys/netinet/ip_fw.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sys/netinet/ip_fw.c b/sys/netinet/ip_fw.c
index 242a303..f32bff2 100644
--- a/sys/netinet/ip_fw.c
+++ b/sys/netinet/ip_fw.c
@@ -12,7 +12,7 @@
*
* This software is provided ``AS IS'' without any warranties of any kind.
*
- * $Id: ip_fw.c,v 1.117 1999/08/11 15:34:47 luigi Exp $
+ * $Id: ip_fw.c,v 1.118 1999/08/21 18:35:50 green Exp $
*/
/*
@@ -1013,7 +1013,7 @@ add_entry(struct ip_fw_head *chainptr, struct ip_fw *frwl)
bzero(ftmp_ext, sizeof(*ftmp_ext)); /* play safe! */
bcopy(frwl, ftmp, sizeof(*ftmp));
if (ftmp->fw_flg & IP_FW_F_RND_MATCH)
- ftmp_ext->dont_match_prob = (long)(ftmp->pipe_ptr) ;
+ ftmp_ext->dont_match_prob = (intptr_t)ftmp->pipe_ptr;
ftmp->fw_in_if.fu_via_if.name[FW_IFNLEN - 1] = '\0';
ftmp->fw_pcnt = 0L;
@@ -1357,9 +1357,9 @@ ip_fw_ctl(struct sockopt *sopt)
for (fcp = LIST_FIRST(&ip_fw_chain), bp = buf; fcp;
fcp = LIST_NEXT(fcp, chain)) {
bcopy(fcp->rule, bp, sizeof *fcp->rule);
- (long)bp->pipe_ptr =
+ bp->pipe_ptr = (intptr_t)
((struct ip_fw_ext *)fcp->rule)->dont_match_prob;
- bp ++ ;
+ bp++;
}
error = sooptcopyout(sopt, buf, size);
FREE(buf, M_TEMP);
OpenPOWER on IntegriCloud