git.droids-corp.org
/
dpdk.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ipc: end multiprocess thread during cleanup
[dpdk.git]
/
lib
/
ethdev
/
rte_flow.c
diff --git
a/lib/ethdev/rte_flow.c
b/lib/ethdev/rte_flow.c
index
d268784
..
a93f68a
100644
(file)
--- a/
lib/ethdev/rte_flow.c
+++ b/
lib/ethdev/rte_flow.c
@@
-54,11
+54,13
@@
rte_flow_conv_copy(void *buf, const void *data, const size_t size,
/**
* Allow PMD private flow item
*/
/**
* Allow PMD private flow item
*/
- size_t sz = type >= 0 ? desc[type].size : sizeof(void *);
+ bool rte_type = type >= 0;
+
+ size_t sz = rte_type ? desc[type].size : sizeof(void *);
if (buf == NULL || data == NULL)
return 0;
rte_memcpy(buf, data, (size > sz ? sz : size));
if (buf == NULL || data == NULL)
return 0;
rte_memcpy(buf, data, (size > sz ? sz : size));
- if (desc[type].desc_fn)
+ if (
rte_type &&
desc[type].desc_fn)
sz += desc[type].desc_fn(size > 0 ? buf : NULL, data);
return sz;
}
sz += desc[type].desc_fn(size > 0 ? buf : NULL, data);
return sz;
}