Absolute File Name: | /home/opencoverage/opencoverage/guest-scripts/coreutils/src/gnulib/lib/file-set.c |
Switch to Source code | Preprocessed file |
Line | Source | Count | ||||||
---|---|---|---|---|---|---|---|---|
1 | - | |||||||
2 | - | |||||||
3 | - | |||||||
4 | - | |||||||
5 | - | |||||||
6 | void | - | ||||||
7 | record_file (Hash_table *ht, char const *file, struct stat const *stats) | - | ||||||
8 | { | - | ||||||
9 | struct F_triple *ent; | - | ||||||
10 | - | |||||||
11 | if (ht ==
| 81-4157 | ||||||
12 | ((void *)0)
| 81-4157 | ||||||
13 | ) | - | ||||||
14 | return; executed 81 times by 1 test: return; Executed by:
| 81 | ||||||
15 | - | |||||||
16 | ent = xmalloc (sizeof *ent); | - | ||||||
17 | ent->name = xstrdup (file); | - | ||||||
18 | ent->st_ino = stats->st_ino; | - | ||||||
19 | ent->st_dev = stats->st_dev; | - | ||||||
20 | - | |||||||
21 | { | - | ||||||
22 | struct F_triple *ent_from_table = hash_insert (ht, ent); | - | ||||||
23 | if (ent_from_table ==
| 0-4157 | ||||||
24 | ((void *)0)
| 0-4157 | ||||||
25 | ) | - | ||||||
26 | { | - | ||||||
27 | - | |||||||
28 | xalloc_die (); | - | ||||||
29 | } never executed: end of block | 0 | ||||||
30 | - | |||||||
31 | if (ent_from_table != ent
| 4-4153 | ||||||
32 | { | - | ||||||
33 | - | |||||||
34 | - | |||||||
35 | triple_free (ent); | - | ||||||
36 | } executed 4 times by 1 test: end of block Executed by:
| 4 | ||||||
37 | } | - | ||||||
38 | } executed 4157 times by 6 tests: end of block Executed by:
| 4157 | ||||||
39 | - | |||||||
40 | - | |||||||
41 | - | |||||||
42 | - | |||||||
43 | _Bool | - | ||||||
44 | - | |||||||
45 | seen_file (Hash_table const *ht, char const *file, | - | ||||||
46 | struct stat const *stats) | - | ||||||
47 | { | - | ||||||
48 | struct F_triple new_ent; | - | ||||||
49 | - | |||||||
50 | if (ht ==
| 218-692 | ||||||
51 | ((void *)0)
| 218-692 | ||||||
52 | ) | - | ||||||
53 | return executed 692 times by 3 tests: return 0 ; Executed by:
executed 692 times by 3 tests: return 0 ; Executed by:
| 692 | ||||||
54 | 0 executed 692 times by 3 tests: return 0 ; Executed by:
| 692 | ||||||
55 | ; executed 692 times by 3 tests: return 0 ; Executed by:
| 692 | ||||||
56 | - | |||||||
57 | new_ent.name = (char *) file; | - | ||||||
58 | new_ent.st_ino = stats->st_ino; | - | ||||||
59 | new_ent.st_dev = stats->st_dev; | - | ||||||
60 | - | |||||||
61 | return executed 218 times by 5 tests: !!hash_lookup (ht, &new_ent);return !!hash_lookup (ht, &new_ent); Executed by:
executed 218 times by 5 tests: return !!hash_lookup (ht, &new_ent); Executed by:
| 218 | ||||||
62 | } | - | ||||||
Switch to Source code | Preprocessed file |