Compares two sorted claim sets and returns which side is later in the RFC-defined ordering. Identical sets are not treated as conflicts.
| 899 | // Compares two sorted claim sets and returns which side is later in the |
| 900 | // RFC-defined ordering. Identical sets are not treated as conflicts. |
| 901 | static int CompareProbeRecordSets(const ProbeRecord* a, uint32_t a_count, const ProbeRecord* b, uint32_t b_count) |
| 902 | { |
| 903 | const uint32_t min_count = a_count < b_count ? a_count : b_count; |
| 904 | for (uint32_t i = 0; i < min_count; ++i) |
| 905 | { |
| 906 | int cmp = CompareProbeRecord(a[i], b[i]); |
| 907 | if (cmp != 0) |
| 908 | return cmp; |
| 909 | } |
| 910 | |
| 911 | if (a_count != b_count) |
| 912 | return a_count < b_count ? -1 : 1; |
| 913 | return 0; |
| 914 | } |
| 915 | |
| 916 | // Decodes an incoming authority claim into the same canonical form used for |
| 917 | // locally generated records. SRV names are uncompressed before comparison. |
no test coverage detected