summaryrefslogtreecommitdiff
path: root/apps/plugins/text_viewer/tv_reader.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins/text_viewer/tv_reader.c')
-rw-r--r--apps/plugins/text_viewer/tv_reader.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/apps/plugins/text_viewer/tv_reader.c b/apps/plugins/text_viewer/tv_reader.c
index 8403c305af..b94dc17f65 100644
--- a/apps/plugins/text_viewer/tv_reader.c
+++ b/apps/plugins/text_viewer/tv_reader.c
@@ -132,7 +132,7 @@ void tv_seek(off_t offset, int whence)
132 } 132 }
133} 133}
134 134
135static void tv_change_preferences(const struct tv_preferences *oldp) 135static int tv_change_preferences(const struct tv_preferences *oldp)
136{ 136{
137 unsigned char bom[BOM_SIZE]; 137 unsigned char bom[BOM_SIZE];
138 int cur_start_file_pos = start_file_pos; 138 int cur_start_file_pos = start_file_pos;
@@ -151,7 +151,7 @@ static void tv_change_preferences(const struct tv_preferences *oldp)
151 151
152 fd = rb->open(preferences->file_name, O_RDONLY); 152 fd = rb->open(preferences->file_name, O_RDONLY);
153 if (fd < 0) 153 if (fd < 0)
154 return; 154 return TV_CALLBACK_ERROR;
155 } 155 }
156 156
157 /* 157 /*
@@ -168,6 +168,7 @@ static void tv_change_preferences(const struct tv_preferences *oldp)
168 168
169 file_size = rb->filesize(fd) - start_file_pos; 169 file_size = rb->filesize(fd) - start_file_pos;
170 tv_seek(cur_file_pos + cur_start_file_pos - start_file_pos, SEEK_SET); 170 tv_seek(cur_file_pos + cur_start_file_pos - start_file_pos, SEEK_SET);
171 return TV_CALLBACK_OK;
171} 172}
172 173
173bool tv_init_reader(unsigned char **buf, size_t *size) 174bool tv_init_reader(unsigned char **buf, size_t *size)