Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

extract_view: remove field offset. Was never used. #283

Merged
merged 1 commit into from
Aug 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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;
}
Loading