| 1447 | entry in the table. */ |
| 1448 | |
| 1449 | static bool |
| 1450 | visit_dir (dev_t dev, ino_t ino) |
| 1451 | { |
| 1452 | struct dev_ino *ent; |
| 1453 | struct dev_ino *ent_from_table; |
| 1454 | bool found_match; |
| 1455 | |
| 1456 | ent = xmalloc (sizeof *ent); |
| 1457 | ent->st_ino = ino; |
| 1458 | ent->st_dev = dev; |
| 1459 | |
| 1460 | /* Attempt to insert this entry into the table. */ |
| 1461 | ent_from_table = hash_insert (active_dir_set, ent); |
| 1462 | |
| 1463 | if (ent_from_table == NULL) |
| 1464 | { |
| 1465 | /* Insertion failed due to lack of memory. */ |
| 1466 | xalloc_die (); |
| 1467 | } |
| 1468 | |
| 1469 | found_match = (ent_from_table != ent); |
| 1470 | |
| 1471 | if (found_match) |
| 1472 | { |
| 1473 | /* ent was not inserted, so free it. */ |
| 1474 | free (ent); |
| 1475 | } |
| 1476 | |
| 1477 | return found_match; |
| 1478 | } |
| 1479 | |
| 1480 | static void |
| 1481 | free_pending_ent (struct pending *p) |
no test coverage detected