Skip to content

Commit

Permalink
planner: fix C interface reduce_span return code
Browse files Browse the repository at this point in the history
Problem: there is a bug in the planner C API function to reduce a span.
The final condition has a typo in the return code computation that can
cause incorrect behavior.

Fix the bug.
  • Loading branch information
milroy committed Dec 18, 2024
1 parent b695a7f commit daa589f
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions resource/planner/c/planner_c_interface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -628,9 +628,8 @@ extern "C" int planner_reduce_span (planner_t *ctx,
update_mintime_resource_tree (ctx, list);
rc = 0;
} else {
// Error
// Error; rc already -1
errno = EINVAL;
rc - 1;
}

return rc;
Expand Down

0 comments on commit daa589f

Please sign in to comment.