Fix warning when compiling with gcc46:

error: variable 'origextlen' set but not used

Approved by:	dim
MFC after:	3 days
This commit is contained in:
Eitan Adler 2012-01-10 02:59:01 +00:00
parent 14f6494f61
commit dc70efcef7
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=229912

View File

@ -1812,7 +1812,7 @@ pr_ip6opt(void *extbuf, size_t bufsize)
struct ip6_hbh *ext;
int currentlen;
u_int8_t type;
socklen_t extlen, len, origextlen;
socklen_t extlen, len;
void *databuf;
size_t offset;
u_int16_t value2;
@ -1828,7 +1828,6 @@ pr_ip6opt(void *extbuf, size_t bufsize)
* subtract the size of a cmsg structure from the buffer size.
*/
if (bufsize < (extlen + CMSG_SPACE(0))) {
origextlen = extlen;
extlen = bufsize - CMSG_SPACE(0);
warnx("options truncated, showing only %u (total=%u)",
(unsigned int)(extlen / 8 - 1),