diff options
author | 2014-11-16 17:40:17 +0000 | |
---|---|---|
committer | 2014-11-16 17:40:17 +0000 | |
commit | e04cbca0bb7dcb6bd0be44b126d48e08d14e12a1 (patch) | |
tree | 67750950f605b232cbacc70c11e2d58200e05ff9 /sys/netinet/tcp_subr.c | |
parent | Defining the interface in terms of char * means most callers are (diff) | |
download | wireguard-openbsd-e04cbca0bb7dcb6bd0be44b126d48e08d14e12a1.tar.xz wireguard-openbsd-e04cbca0bb7dcb6bd0be44b126d48e08d14e12a1.zip |
remove now unnecessary casts from hash update calls.
Diffstat (limited to 'sys/netinet/tcp_subr.c')
-rw-r--r-- | sys/netinet/tcp_subr.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/sys/netinet/tcp_subr.c b/sys/netinet/tcp_subr.c index a3810f38c0d..628aac461a0 100644 --- a/sys/netinet/tcp_subr.c +++ b/sys/netinet/tcp_subr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: tcp_subr.c,v 1.136 2014/11/06 12:05:32 mpi Exp $ */ +/* $OpenBSD: tcp_subr.c,v 1.137 2014/11/16 17:40:17 tedu Exp $ */ /* $NetBSD: tcp_subr.c,v 1.22 1996/02/13 23:44:00 christos Exp $ */ /* @@ -963,18 +963,18 @@ tcp_set_iss_tsm(struct tcpcb *tp) tcp_secret_init = 1; } ctx = tcp_secret_ctx; - SHA512Update(&ctx, (char *)&rdomain, sizeof(rdomain)); - SHA512Update(&ctx, (char *)&tp->t_inpcb->inp_lport, sizeof(u_short)); - SHA512Update(&ctx, (char *)&tp->t_inpcb->inp_fport, sizeof(u_short)); + SHA512Update(&ctx, &rdomain, sizeof(rdomain)); + SHA512Update(&ctx, &tp->t_inpcb->inp_lport, sizeof(u_short)); + SHA512Update(&ctx, &tp->t_inpcb->inp_fport, sizeof(u_short)); if (tp->pf == AF_INET6) { - SHA512Update(&ctx, (char *)&tp->t_inpcb->inp_laddr6, + SHA512Update(&ctx, &tp->t_inpcb->inp_laddr6, sizeof(struct in6_addr)); - SHA512Update(&ctx, (char *)&tp->t_inpcb->inp_faddr6, + SHA512Update(&ctx, &tp->t_inpcb->inp_faddr6, sizeof(struct in6_addr)); } else { - SHA512Update(&ctx, (char *)&tp->t_inpcb->inp_laddr, + SHA512Update(&ctx, &tp->t_inpcb->inp_laddr, sizeof(struct in_addr)); - SHA512Update(&ctx, (char *)&tp->t_inpcb->inp_faddr, + SHA512Update(&ctx, &tp->t_inpcb->inp_faddr, sizeof(struct in_addr)); } SHA512Final(digest.bytes, &ctx); |