summaryrefslogtreecommitdiff
path: root/src/input
diff options
context:
space:
mode:
authorFran├žois Revel <mmu_man@netsurf-browser.org>2008-11-29 23:51:13 +0000
committerFran├žois Revel <mmu_man@netsurf-browser.org>2008-11-29 23:51:13 +0000
commit16643b695cdc00dfc4580bb66b894b931ff74693 (patch)
tree0ff720ddc7cbd59f6c871da4195c214058c3989d /src/input
parent305940a1a9430c381d04dc181f61123fa80ab74f (diff)
downloadlibparserutils-16643b695cdc00dfc4580bb66b894b931ff74693.tar.gz
libparserutils-16643b695cdc00dfc4580bb66b894b931ff74693.tar.bz2
C89
svn path=/trunk/libparserutils/; revision=5840
Diffstat (limited to 'src/input')
-rw-r--r--src/input/filter.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/input/filter.c b/src/input/filter.c
index 491da0c..7ed4ec6 100644
--- a/src/input/filter.c
+++ b/src/input/filter.c
@@ -242,9 +242,9 @@ parserutils_error parserutils_filter_process_chunk(parserutils_filter *input,
return PARSERUTILS_OK;
#else
- parserutils_error read_error, write_error;
-
if (input->leftover) {
+ parserutils_error write_error;
+
/* Some data left to be written from last call */
/* Attempt to flush the remaining data. */
@@ -265,6 +265,7 @@ parserutils_error parserutils_filter_process_chunk(parserutils_filter *input,
}
while (*len > 0) {
+ parserutils_error read_error, write_error;
size_t pivot_len = sizeof(input->pivot_buf);
uint8_t *pivot = (uint8_t *) input->pivot_buf;
@@ -308,14 +309,14 @@ parserutils_error parserutils_filter_process_chunk(parserutils_filter *input,
*/
parserutils_error parserutils_filter_reset(parserutils_filter *input)
{
+ parserutils_error error = PARSERUTILS_OK;
+
if (input == NULL)
return PARSERUTILS_BADPARM;
#ifdef WITH_ICONV_FILTER
iconv(input->cd, NULL, 0, NULL, 0);
#else
- parserutils_error error;
-
/* Clear pivot buffer leftovers */
input->pivot_left = NULL;
input->pivot_len = 0;
@@ -332,7 +333,7 @@ parserutils_error parserutils_filter_reset(parserutils_filter *input)
return error;
#endif
- return PARSERUTILS_OK;
+ return error;
}
/**