summaryrefslogtreecommitdiff
path: root/src/utils/vector.c
diff options
context:
space:
mode:
authorFran├žois Revel <mmu_man@netsurf-browser.org>2008-11-29 22:55:56 +0000
committerFran├žois Revel <mmu_man@netsurf-browser.org>2008-11-29 22:55:56 +0000
commit50e64e8710e3af657ad97053e16435c284dc80e2 (patch)
treead2ce27279bcec54352257362197d5bc66cfb56b /src/utils/vector.c
parentcfad5e411a897bd30bf9f6014e58a25f1ecb69da (diff)
downloadlibparserutils-50e64e8710e3af657ad97053e16435c284dc80e2.tar.gz
libparserutils-50e64e8710e3af657ad97053e16435c284dc80e2.tar.bz2
C89
svn path=/trunk/libparserutils/; revision=5838
Diffstat (limited to 'src/utils/vector.c')
-rw-r--r--src/utils/vector.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/utils/vector.c b/src/utils/vector.c
index f99b773..2571ba4 100644
--- a/src/utils/vector.c
+++ b/src/utils/vector.c
@@ -218,10 +218,12 @@ extern void parserutils_vector_dump(parserutils_vector *vector,
void parserutils_vector_dump(parserutils_vector *vector, const char *prefix,
void (*printer)(void *item))
{
+ int32_t i;
+
if (vector == NULL || printer == NULL)
return;
- for (int32_t i = 0; i <= vector->current_item; i++) {
+ for (i = 0; i <= vector->current_item; i++) {
printf("%s %d: ", prefix != NULL ? prefix : "", i);
printer((uint8_t *) vector->items + (i * vector->item_size));
printf("\n");