| 266 | } |
| 267 | |
| 268 | static struct line_log_data * |
| 269 | search_line_log_data(struct line_log_data *list, const char *path, |
| 270 | struct line_log_data **insertion_point) |
| 271 | { |
| 272 | struct line_log_data *p = list; |
| 273 | if (insertion_point) |
| 274 | *insertion_point = NULL; |
| 275 | while (p) { |
| 276 | int cmp = strcmp(p->path, path); |
| 277 | if (!cmp) |
| 278 | return p; |
| 279 | if (insertion_point && cmp < 0) |
| 280 | *insertion_point = p; |
| 281 | p = p->next; |
| 282 | } |
| 283 | return NULL; |
| 284 | } |
| 285 | |
| 286 | /* |
| 287 | * Note: takes ownership of 'path', which happens to be what the only |
no outgoing calls
no test coverage detected