* Make sure 2 sequential items in @params are not equal (based on * provided comparator). */
| 208 | * provided comparator). |
| 209 | */ |
| 210 | static bool check_distinct(struct param *params, |
| 211 | int (*compar) (const struct param *a, |
| 212 | const struct param *b, void *unused)) |
| 213 | { |
| 214 | struct param *first = params; |
| 215 | struct param *last = first + tal_count(params); |
| 216 | first++; |
| 217 | while (first != last) { |
| 218 | if (compar(first - 1, first, NULL) == 0) |
| 219 | return false; |
| 220 | first++; |
| 221 | } |
| 222 | return true; |
| 223 | } |
| 224 | |
| 225 | static bool check_unique(struct param *copy, |
| 226 | int (*compar) (const struct param *a, |
no outgoing calls
no test coverage detected