Bug 173521

Summary: [ip6] remove useless assign in ip6_hopopts_input
Product: Base System Reporter: yizhouzhou
Component: kernAssignee: Andrey V. Elsukov <ae>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: Unspecified   
Hardware: Any   
OS: Any   

Description yizhouzhou 2012-11-10 09:40:02 UTC
I think opt = (u_int8_t *)hbh + sizeof(struct ip6_hbh) in ip6_hopopts_input
is currently useless  :-)

Fix: 

remove it
Comment 1 Mark Linimon freebsd_committer freebsd_triage 2014-04-17 05:25:45 UTC
Responsible Changed
From-To: freebsd-bugs->freebsd-net

reassign.
Comment 2 dfilter service freebsd_committer freebsd_triage 2014-04-17 07:40:15 UTC
Author: ae
Date: Thu Apr 17 06:40:11 2014
New Revision: 264582
URL: http://svnweb.freebsd.org/changeset/base/264582

Log:
  Remove unused variable.
  
  PR:		173521
  MFC after:	1 week
  Sponsored by:	Yandex LLC

Modified:
  head/sys/netinet6/ip6_input.c

Modified: head/sys/netinet6/ip6_input.c
==============================================================================
--- head/sys/netinet6/ip6_input.c	Thu Apr 17 01:43:15 2014	(r264581)
+++ head/sys/netinet6/ip6_input.c	Thu Apr 17 06:40:11 2014	(r264582)
@@ -1076,7 +1076,6 @@ ip6_hopopts_input(u_int32_t *plenp, u_in
 	struct mbuf *m = *mp;
 	int off = *offp, hbhlen;
 	struct ip6_hbh *hbh;
-	u_int8_t *opt;
 
 	/* validation of the length of the header */
 #ifndef PULLDOWN_TEST
@@ -1103,8 +1102,6 @@ ip6_hopopts_input(u_int32_t *plenp, u_in
 #endif
 	off += hbhlen;
 	hbhlen -= sizeof(struct ip6_hbh);
-	opt = (u_int8_t *)hbh + sizeof(struct ip6_hbh);
-
 	if (ip6_process_hopopts(m, (u_int8_t *)hbh + sizeof(struct ip6_hbh),
 				hbhlen, rtalertp, plenp) < 0)
 		return (-1);
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
Comment 3 Andrey V. Elsukov freebsd_committer freebsd_triage 2014-04-17 07:40:24 UTC
State Changed
From-To: open->patched

Patched in head/. 


Comment 4 Andrey V. Elsukov freebsd_committer freebsd_triage 2014-04-17 07:40:24 UTC
Responsible Changed
From-To: freebsd-net->ae

Take it.
Comment 5 dfilter service freebsd_committer freebsd_triage 2014-04-24 12:12:57 UTC
Author: ae
Date: Thu Apr 24 11:12:53 2014
New Revision: 264873
URL: http://svnweb.freebsd.org/changeset/base/264873

Log:
  MFC r264582:
    Remove unused variable.
  
  PR:		173521

Modified:
  stable/10/sys/netinet6/ip6_input.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/sys/netinet6/ip6_input.c
==============================================================================
--- stable/10/sys/netinet6/ip6_input.c	Thu Apr 24 10:27:21 2014	(r264872)
+++ stable/10/sys/netinet6/ip6_input.c	Thu Apr 24 11:12:53 2014	(r264873)
@@ -1074,7 +1074,6 @@ ip6_hopopts_input(u_int32_t *plenp, u_in
 	struct mbuf *m = *mp;
 	int off = *offp, hbhlen;
 	struct ip6_hbh *hbh;
-	u_int8_t *opt;
 
 	/* validation of the length of the header */
 #ifndef PULLDOWN_TEST
@@ -1101,8 +1100,6 @@ ip6_hopopts_input(u_int32_t *plenp, u_in
 #endif
 	off += hbhlen;
 	hbhlen -= sizeof(struct ip6_hbh);
-	opt = (u_int8_t *)hbh + sizeof(struct ip6_hbh);
-
 	if (ip6_process_hopopts(m, (u_int8_t *)hbh + sizeof(struct ip6_hbh),
 				hbhlen, rtalertp, plenp) < 0)
 		return (-1);
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
Comment 6 dfilter service freebsd_committer freebsd_triage 2014-04-24 12:13:43 UTC
Author: ae
Date: Thu Apr 24 11:13:38 2014
New Revision: 264874
URL: http://svnweb.freebsd.org/changeset/base/264874

Log:
  MFC r264582:
    Remove unused variable.
  
  PR:		173521

Modified:
  stable/9/sys/netinet6/ip6_input.c
Directory Properties:
  stable/9/sys/   (props changed)

Modified: stable/9/sys/netinet6/ip6_input.c
==============================================================================
--- stable/9/sys/netinet6/ip6_input.c	Thu Apr 24 11:12:53 2014	(r264873)
+++ stable/9/sys/netinet6/ip6_input.c	Thu Apr 24 11:13:38 2014	(r264874)
@@ -1085,7 +1085,6 @@ ip6_hopopts_input(u_int32_t *plenp, u_in
 	struct mbuf *m = *mp;
 	int off = *offp, hbhlen;
 	struct ip6_hbh *hbh;
-	u_int8_t *opt;
 
 	/* validation of the length of the header */
 #ifndef PULLDOWN_TEST
@@ -1112,8 +1111,6 @@ ip6_hopopts_input(u_int32_t *plenp, u_in
 #endif
 	off += hbhlen;
 	hbhlen -= sizeof(struct ip6_hbh);
-	opt = (u_int8_t *)hbh + sizeof(struct ip6_hbh);
-
 	if (ip6_process_hopopts(m, (u_int8_t *)hbh + sizeof(struct ip6_hbh),
 				hbhlen, rtalertp, plenp) < 0)
 		return (-1);
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
Comment 7 dfilter service freebsd_committer freebsd_triage 2014-04-24 12:14:21 UTC
Author: ae
Date: Thu Apr 24 11:14:17 2014
New Revision: 264875
URL: http://svnweb.freebsd.org/changeset/base/264875

Log:
  MFC r264582:
    Remove unused variable.
  
  PR:		173521

Modified:
  stable/8/sys/netinet6/ip6_input.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/netinet6/   (props changed)

Modified: stable/8/sys/netinet6/ip6_input.c
==============================================================================
--- stable/8/sys/netinet6/ip6_input.c	Thu Apr 24 11:13:38 2014	(r264874)
+++ stable/8/sys/netinet6/ip6_input.c	Thu Apr 24 11:14:17 2014	(r264875)
@@ -991,7 +991,6 @@ ip6_hopopts_input(u_int32_t *plenp, u_in
 	struct mbuf *m = *mp;
 	int off = *offp, hbhlen;
 	struct ip6_hbh *hbh;
-	u_int8_t *opt;
 
 	/* validation of the length of the header */
 #ifndef PULLDOWN_TEST
@@ -1018,8 +1017,6 @@ ip6_hopopts_input(u_int32_t *plenp, u_in
 #endif
 	off += hbhlen;
 	hbhlen -= sizeof(struct ip6_hbh);
-	opt = (u_int8_t *)hbh + sizeof(struct ip6_hbh);
-
 	if (ip6_process_hopopts(m, (u_int8_t *)hbh + sizeof(struct ip6_hbh),
 				hbhlen, rtalertp, plenp) < 0)
 		return (-1);
_______________________________________________
svn-src-all@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
Comment 8 Andrey V. Elsukov freebsd_committer freebsd_triage 2014-04-24 12:14:53 UTC
State Changed
From-To: patched->closed

Merged to stable/8-10. Thanks!