Code Review
/
vpp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
dev: new device driver infra
[vpp.git]
/
src
/
vppinfra
/
vec_bootstrap.h
diff --git
a/src/vppinfra/vec_bootstrap.h
b/src/vppinfra/vec_bootstrap.h
index
5c827d4
..
5ea7a80
100644
(file)
--- a/
src/vppinfra/vec_bootstrap.h
+++ b/
src/vppinfra/vec_bootstrap.h
@@
-239,8
+239,9
@@
_vec_set_len (void *v, uword len, uword elt_sz)
for ((var) = vec_len ((v)) - 1; (var) >= 0; (var)--)
#define vec_foreach_pointer(e, v) \
for ((var) = vec_len ((v)) - 1; (var) >= 0; (var)--)
#define vec_foreach_pointer(e, v) \
- for (typeof (**v) **__ep = (v), *(e) = *__ep; __ep - (v) < vec_len (v); \
- __ep++, (e) = *__ep)
+ if (v) \
+ for (typeof (**v) **__ep = (v), *(e) = *__ep; __ep - (v) < vec_len (v); \
+ __ep++, (e) = *__ep)
#endif /* included_clib_vec_bootstrap_h */
#endif /* included_clib_vec_bootstrap_h */