git.droids-corp.org
/
dpdk.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5e1f62f
)
mbuf: cleanup function to get last segment
author
Ilya V. Matveychikov
<matvejchikov@gmail.com>
Sat, 9 Dec 2017 21:08:22 +0000
(
00:08
+0300)
committer
Thomas Monjalon
<thomas@monjalon.net>
Thu, 11 Jan 2018 23:37:07 +0000
(
00:37
+0100)
There is no reason to have local variable m2.
Fixes:
af75078fece3
("first public release")
Signed-off-by: Ilya V. Matveychikov <matvejchikov@gmail.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
lib/librte_mbuf/rte_mbuf.h
patch
|
blob
|
history
diff --git
a/lib/librte_mbuf/rte_mbuf.h
b/lib/librte_mbuf/rte_mbuf.h
index
ce8a05d
..
e4e3917
100644
(file)
--- a/
lib/librte_mbuf/rte_mbuf.h
+++ b/
lib/librte_mbuf/rte_mbuf.h
@@
-1541,12
+1541,10
@@
static inline uint16_t rte_pktmbuf_tailroom(const struct rte_mbuf *m)
*/
static inline struct rte_mbuf *rte_pktmbuf_lastseg(struct rte_mbuf *m)
{
- struct rte_mbuf *m2 = (struct rte_mbuf *)m;
-
__rte_mbuf_sanity_check(m, 1);
- while (m
2
->next != NULL)
- m
2 = m2
->next;
- return m
2
;
+ while (m->next != NULL)
+ m
= m
->next;
+ return m;
}
/**