Skip to content

Commit

Permalink
Use qvi_bbuff_dup() in another spot. (#225)
Browse files Browse the repository at this point in the history
Signed-off-by: Samuel K. Gutierrez <samuel@lanl.gov>
  • Loading branch information
samuelkgutierrez committed Jul 14, 2024
1 parent 458d1ea commit de44bb6
Showing 1 changed file with 1 addition and 9 deletions.
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

0 comments on commit de44bb6

Please sign in to comment.