Skip to content

Commit

Permalink
Simplify qvi_scope_split_at().
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 Apr 30, 2024
1 parent d4afcdc commit d8bc982
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions src/qvi-scope.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1249,19 +1249,11 @@ qvi_scope_split_at(
int color,
qv_scope_t **child
) {
qv_scope_t *ichild = nullptr;

int nobj = 0;
int rc = qvi_scope_nobjs(parent, type, &nobj);
if (rc != QV_SUCCESS) goto out;
if (rc != QV_SUCCESS) return rc;

rc = qvi_scope_split(parent, nobj, color, type, &ichild);
out:
if (rc != QV_SUCCESS) {
qvi_scope_free(&ichild);
}
*child = ichild;
return rc;
return qvi_scope_split(parent, nobj, color, type, child);
}

int
Expand Down

0 comments on commit d8bc982

Please sign in to comment.