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

Use qvi_bbuff_dup() in another spot. #225

Merged
merged 1 commit into from
Jul 14, 2024
Merged
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
10 changes: 1 addition & 9 deletions src/qvi-process.cc
Original file line number Diff line number Diff line change
Expand Up @@ -102,16 +102,8 @@ qvi_process_group_scatter_bbuffs(
qvi_abort();
}
// There should always be only one at the root (us).
qvi_bbuff_t *inbuff = txbuffs[root];
const size_t data_size = qvi_bbuff_size(inbuff);
const void *data = qvi_bbuff_data(inbuff);

qvi_bbuff_t *mybbuff = nullptr;
int rc = qvi_bbuff_new(&mybbuff);
if (rc != QV_SUCCESS) goto out;

rc = qvi_bbuff_append(mybbuff, data, data_size);
out:
const int rc = qvi_bbuff_dup(txbuffs[root], &mybbuff);
if (rc != QV_SUCCESS) {
qvi_bbuff_free(&mybbuff);
}
Expand Down
Loading