Absolute File Name: | /home/opencoverage/opencoverage/guest-scripts/coreutils/src/gnulib/lib/basename.c |
Switch to Source code | Preprocessed file |
Line | Source | Count | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | - | |||||||||||||
2 | - | |||||||||||||
3 | - | |||||||||||||
4 | char * | - | ||||||||||||
5 | base_name (char const *name) | - | ||||||||||||
6 | { | - | ||||||||||||
7 | char const *base = last_component (name); | - | ||||||||||||
8 | size_t length; | - | ||||||||||||
9 | - | |||||||||||||
10 | - | |||||||||||||
11 | - | |||||||||||||
12 | if (! *base
| 6-34 | ||||||||||||
13 | return executed 6 times by 1 test: xstrndup (name, base_len (name));return xstrndup (name, base_len (name)); Executed by:
executed 6 times by 1 test: return xstrndup (name, base_len (name)); Executed by:
| 6 | ||||||||||||
14 | - | |||||||||||||
15 | - | |||||||||||||
16 | length = base_len (base); | - | ||||||||||||
17 | if (((
| 5-29 | ||||||||||||
18 | length++; executed 5 times by 1 test: length++; Executed by:
| 5 | ||||||||||||
19 | - | |||||||||||||
20 | - | |||||||||||||
21 | - | |||||||||||||
22 | - | |||||||||||||
23 | if (0) | - | ||||||||||||
24 | { dead code: { char *p = xmalloc (length + 3); p[0] = '.'; p[1] = '/'; memcpy (p + 2, base, length); p[length + 2] = '\0'; return p; } | - | ||||||||||||
25 | char *p = xmalloc (length + 3); dead code: { char *p = xmalloc (length + 3); p[0] = '.'; p[1] = '/'; memcpy (p + 2, base, length); p[length + 2] = '\0'; return p; } | - | ||||||||||||
26 | p[0] = '.'; dead code: { char *p = xmalloc (length + 3); p[0] = '.'; p[1] = '/'; memcpy (p + 2, base, length); p[length + 2] = '\0'; return p; } | - | ||||||||||||
27 | p[1] = '/'; dead code: { char *p = xmalloc (length + 3); p[0] = '.'; p[1] = '/'; memcpy (p + 2, base, length); p[length + 2] = '\0'; return p; } | - | ||||||||||||
28 | memcpy (p + 2, base, length); dead code: { char *p = xmalloc (length + 3); p[0] = '.'; p[1] = '/'; memcpy (p + 2, base, length); p[length + 2] = '\0'; return p; } | - | ||||||||||||
29 | p[length + 2] = '\0'; dead code: { char *p = xmalloc (length + 3); p[0] = '.'; p[1] = '/'; memcpy (p + 2, base, length); p[length + 2] = '\0'; return p; } | - | ||||||||||||
30 | return p; dead code: { char *p = xmalloc (length + 3); p[0] = '.'; p[1] = '/'; memcpy (p + 2, base, length); p[length + 2] = '\0'; return p; } | - | ||||||||||||
31 | } dead code: { char *p = xmalloc (length + 3); p[0] = '.'; p[1] = '/'; memcpy (p + 2, base, length); p[length + 2] = '\0'; return p; } | - | ||||||||||||
32 | - | |||||||||||||
33 | - | |||||||||||||
34 | return executed 34 times by 1 test: xstrndup (base, length);return xstrndup (base, length); Executed by:
executed 34 times by 1 test: return xstrndup (base, length); Executed by:
| 34 | ||||||||||||
35 | } | - | ||||||||||||
Switch to Source code | Preprocessed file |