* Make sure 2 sequential items in @params are not equal (based on * provided comparator). */
| 219 | * provided comparator). |
| 220 | */ |
| 221 | static void check_distinct(const struct param *params, |
| 222 | int (*compar)(const struct param *a, |
| 223 | const struct param *b, void *unused)) |
| 224 | { |
| 225 | const struct param *first = params; |
| 226 | const struct param *last = first + tal_count(params); |
| 227 | first++; |
| 228 | while (first != last) { |
| 229 | paramcheck_assert(compar(first - 1, first, NULL) != 0); |
| 230 | first++; |
| 231 | } |
| 232 | } |
| 233 | |
| 234 | static void check_unique(struct param *copy, |
| 235 | int (*compar) (const struct param *a, |
no outgoing calls
no test coverage detected