Code Review
/
deb_dpdk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
New upstream version 16.11.5
[deb_dpdk.git]
/
lib
/
librte_mbuf
/
rte_mbuf.h
diff --git
a/lib/librte_mbuf/rte_mbuf.h
b/lib/librte_mbuf/rte_mbuf.h
index
8a814df
..
bc015d0
100644
(file)
--- a/
lib/librte_mbuf/rte_mbuf.h
+++ b/
lib/librte_mbuf/rte_mbuf.h
@@
-1233,13
+1233,14
@@
rte_pktmbuf_free_seg(struct rte_mbuf *m)
* segment is added back into its original mempool.
*
* @param m
* segment is added back into its original mempool.
*
* @param m
- * The packet mbuf to be freed.
+ * The packet mbuf to be freed.
If NULL, the function does nothing.
*/
static inline void rte_pktmbuf_free(struct rte_mbuf *m)
{
struct rte_mbuf *m_next;
*/
static inline void rte_pktmbuf_free(struct rte_mbuf *m)
{
struct rte_mbuf *m_next;
- __rte_mbuf_sanity_check(m, 1);
+ if (m != NULL)
+ __rte_mbuf_sanity_check(m, 1);
while (m != NULL) {
m_next = m->next;
while (m != NULL) {
m_next = m->next;
@@
-1361,12
+1362,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)
{
*/
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);
__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;
}
/**
}
/**