diff options
author | khramshinr <khramshinr@gmail.com> | 2024-04-09 19:52:47 +0800 |
---|---|---|
committer | John Estabrook <jestabro@vyos.io> | 2024-04-26 09:52:09 -0500 |
commit | bd9a4fab9cf02a2aa2e33b5a4fba970308491ea0 (patch) | |
tree | 3d522d347612b37b5931e97f93e0a739c48f908e | |
parent | e3d388fffe8e0cfa37587032bd480592d2ff1905 (diff) | |
download | vyatta-cfg-bd9a4fab9cf02a2aa2e33b5a4fba970308491ea0.tar.gz vyatta-cfg-bd9a4fab9cf02a2aa2e33b5a4fba970308491ea0.zip |
configdep: T6206 fix marker for last element of delete priority queues
related task: T5660: add marker for last element of priority queues
(cherry picked from commit 5183b6fd34e4a9a5443406e801ec70139e68c471)
-rw-r--r-- | src/commit/commit-algorithm.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/commit/commit-algorithm.cpp b/src/commit/commit-algorithm.cpp index ab7eee6..a84fdf5 100644 --- a/src/commit/commit-algorithm.cpp +++ b/src/commit/commit-algorithm.cpp @@ -1308,6 +1308,8 @@ commit::doCommit(Cstore& cs, CfgNode& cfg1, CfgNode& cfg2) TRACE_INIT("Processing the Priority Queue"); clear_last(); int num = pq.size(); + // decrease by one because we have one root element + --num; while (!dpq.empty()) { PrioNode *p = dpq.top(); set_if_last(num+dpq.size()); |