diff options
author | Michael Tuexen <tuexen@FreeBSD.org> | 2015-01-12 07:55:16 +0000 |
---|---|---|
committer | Michael Tuexen <tuexen@FreeBSD.org> | 2015-01-12 07:55:16 +0000 |
commit | d89abe19b053503cf9a2d14a462d8d866a85e97a (patch) | |
tree | 653afa203c23a57d691c9c96cc08b37fd2257310 /sys/netinet/sctp_output.c | |
parent | b5243bd4f701bd43139d5ba948538d73d5df490f (diff) | |
download | src-d89abe19b053503cf9a2d14a462d8d866a85e97a.tar.gz src-d89abe19b053503cf9a2d14a462d8d866a85e97a.zip |
Remove dead code.
Reported by: Coverity
CID: 748664
MFC after: 1 week
Notes
Notes:
svn path=/head/; revision=277053
Diffstat (limited to 'sys/netinet/sctp_output.c')
-rw-r--r-- | sys/netinet/sctp_output.c | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/sys/netinet/sctp_output.c b/sys/netinet/sctp_output.c index cec4869a6cfc..59e4343e1b85 100644 --- a/sys/netinet/sctp_output.c +++ b/sys/netinet/sctp_output.c @@ -8917,12 +8917,11 @@ sctp_send_cookie_echo(struct mbuf *m, struct sctp_tmit_chunk *chk; uint16_t ptype, plen; + SCTP_TCB_LOCK_ASSERT(stcb); /* First find the cookie in the param area */ cookie = NULL; at = offset + sizeof(struct sctp_init_chunk); - - SCTP_TCB_LOCK_ASSERT(stcb); - do { + for (;;) { phdr = sctp_get_next_param(m, at, &parm, sizeof(parm)); if (phdr == NULL) { return (-3); @@ -8949,13 +8948,8 @@ sctp_send_cookie_echo(struct mbuf *m, break; } at += SCTP_SIZE32(plen); - } while (phdr); - if (cookie == NULL) { - /* Did not find the cookie */ - return (-3); } /* ok, we got the cookie lets change it into a cookie echo chunk */ - /* first the change from param to cookie */ hdr = mtod(cookie, struct sctp_chunkhdr *); hdr->chunk_type = SCTP_COOKIE_ECHO; |