Skip to content

Commit

Permalink
extract_view: remove field offset. Was never used.
Browse files Browse the repository at this point in the history
  • Loading branch information
Gottox committed Aug 14, 2024
1 parent a1d880f commit 80781cf
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 5 deletions.
1 change: 0 additions & 1 deletion libsqsh/include/sqsh_extract_private.h
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,6 @@ struct SqshExtractView {
*/
struct SqshExtractManager *manager;
const struct CxBuffer *buffer;
size_t offset;
size_t size;
};

Expand Down
5 changes: 1 addition & 4 deletions libsqsh/src/extract/extract_view.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ sqsh__extract_view_init(
const struct SqshMapReader *reader) {
int rv = 0;
view->manager = manager;
view->offset = 0;
view->buffer = NULL;

rv = sqsh__extract_manager_uncompress(manager, reader, &view->buffer);
Expand All @@ -61,8 +60,7 @@ sqsh__extract_view_init(

const uint8_t *
sqsh__extract_view_data(const struct SqshExtractView *view) {
const uint8_t *data = cx_buffer_data(view->buffer);
return &data[view->offset];
return cx_buffer_data(view->buffer);
}

size_t
Expand All @@ -79,6 +77,5 @@ sqsh__extract_view_cleanup(struct SqshExtractView *view) {
}
view->buffer = NULL;
view->size = 0;
view->offset = 0;
return rv;
}

0 comments on commit 80781cf

Please sign in to comment.