summaryrefslogtreecommitdiff
path: root/src/utils/stack.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/stack.c
parentcfad5e411a897bd30bf9f6014e58a25f1ecb69da (diff)
downloadlibparserutils-50e64e8710e3af657ad97053e16435c284dc80e2.tar.gz
libparserutils-50e64e8710e3af657ad97053e16435c284dc80e2.tar.bz2
C89
svn path=/trunk/libparserutils/; revision=5838
Diffstat (limited to 'src/utils/stack.c')
-rw-r--r--src/utils/stack.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/utils/stack.c b/src/utils/stack.c
index cee43ee..a157597 100644
--- a/src/utils/stack.c
+++ b/src/utils/stack.c
@@ -173,10 +173,12 @@ extern void parserutils_stack_dump(parserutils_stack *stack, const char *prefix,
void parserutils_stack_dump(parserutils_stack *stack, const char *prefix,
void (*printer)(void *item))
{
+ int32_t i;
+
if (stack == NULL || printer == NULL)
return;
- for (int32_t i = 0; i <= stack->current_item; i++) {
+ for (i = 0; i <= stack->current_item; i++) {
printf("%s %d: ", prefix != NULL ? prefix : "", i);
printer((uint8_t *) stack->items + (i * stack->item_size));
printf("\n");