aboutsummaryrefslogtreecommitdiffstats
path: root/lib/includes/hicn/util/array.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/includes/hicn/util/array.h')
-rw-r--r--lib/includes/hicn/util/array.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/includes/hicn/util/array.h b/lib/includes/hicn/util/array.h
index ab8852ed8..56cfcad8b 100644
--- a/lib/includes/hicn/util/array.h
+++ b/lib/includes/hicn/util/array.h
@@ -167,9 +167,10 @@ NAME ## _get(const NAME ## _t * array, const T search, T * element)
{ \
assert(element); \
for (unsigned i = 0; i < array->size; i++) \
- if (CMP(search, array->elements[i]) == 0) \
+ if (CMP(search, array->elements[i]) == 0) { \
*element = array->elements[i]; \
return 0; \
+ } \
/* Not found */ \
*element = NULL; \
return 0; \