File: s_sift_either_override.c

package info (click to toggle)
aws-crt-python 0.20.4%2Bdfsg-1~bpo12%2B1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm-backports
  • size: 72,656 kB
  • sloc: ansic: 381,805; python: 23,008; makefile: 6,251; sh: 4,536; cpp: 699; ruby: 208; java: 77; perl: 73; javascript: 46; xml: 11
file content (27 lines) | stat: -rw-r--r-- 880 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
/**
 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
 * SPDX-License-Identifier: Apache-2.0.
 */

/**
 * FUNCTION: s_sift_either
 *
 * This function overrides the original implementation of the
 * s_sift_either function from priority_queue.h with a no_op.
 *
 * It is necessary to stub out s_sift_either because in order for it
 * to work, we have to have initialized all backpointers of the
 * priority queue correctly (which needs a loop).
 *
 * It is safe to stub out s_sift_either as long as we don't make any
 * assertions on the positions of elements in the priority queue and
 * their relative values.
 *
 */

#include <aws/common/priority_queue.h>

void __CPROVER_file_local_priority_queue_c_s_sift_either(struct aws_priority_queue *queue, size_t index) {
    assert(aws_priority_queue_is_valid(queue));
    assert(index < queue->container.length);
}