Update stale comments to use `len` instead of `size`.
Fixes: commit cc0567e9aed7e6b40a44bf8eac0a262ac7314fec
Signed-off-by: Nir Soffer <nsoffer(a)redhat.com>
---
common/utils/vector.h | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/common/utils/vector.h b/common/utils/vector.h
index 9ac0867..d828285 100644
--- a/common/utils/vector.h
+++ b/common/utils/vector.h
@@ -59,14 +59,14 @@
*
* string_vector names = empty_vector;
*
- * where ‘names.ptr[]’ will be an array of strings and ‘names.size’
+ * where ‘names.ptr[]’ will be an array of strings and ‘names.len’
* will be the number of strings. There are no get/set accessors. To
* iterate over the strings you can use the ‘.ptr’ field directly:
*
- * for (size_t i = 0; i < names.size; ++i)
+ * for (size_t i = 0; i < names.len; ++i)
* printf ("%s\n", names.ptr[i]);
*
- * Initializing with ‘empty_vector’ sets ‘.ptr = NULL’ and ‘.size = 0’.
+ * Initializing with ‘empty_vector’ sets ‘.ptr = NULL’ and ‘.len = 0’.
*
* DEFINE_VECTOR_TYPE also defines utility functions. For the full
* list see the definition below, but useful functions include:
@@ -91,8 +91,8 @@
typedef struct name name; \
\
/* Reserve n elements at the end of the vector. Note space is \
- * allocated but the vector size is not increased and the new \
- * elements are not initialized. \
+ * allocated and capacity is increased, but the vector length is \
+ * not increased and the new elements are not initialized. \
*/ \
static inline int \
name##_reserve (name *v, size_t n) \
--
2.31.1