OpenCoverage

xstrndup.c

Absolute File Name:/home/opencoverage/opencoverage/guest-scripts/coreutils/src/gnulib/lib/xstrndup.c
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3-
4-
5-
6-
7-
8char *-
9xstrndup (const char *string, size_t n)-
10{-
11 char *s = -
12 (__extension__ (__builtin_constant_p (
__builtin_cons...t_p ( string )Description
TRUEnever evaluated
FALSEevaluated 726 times by 5 tests
Evaluated by:
  • basename
  • cut
  • dircolors
  • expand
  • numfmt
0-726
13 string
__builtin_cons...t_p ( string )Description
TRUEnever evaluated
FALSEevaluated 726 times by 5 tests
Evaluated by:
  • basename
  • cut
  • dircolors
  • expand
  • numfmt
0-726
14 )
__builtin_cons...t_p ( string )Description
TRUEnever evaluated
FALSEevaluated 726 times by 5 tests
Evaluated by:
  • basename
  • cut
  • dircolors
  • expand
  • numfmt
&& ((
((size_t)(cons...string ) == 1)Description
TRUEnever evaluated
FALSEnever evaluated
size_t)(const void *)((
((size_t)(cons...string ) == 1)Description
TRUEnever evaluated
FALSEnever evaluated
0-726
15 string
((size_t)(cons...string ) == 1)Description
TRUEnever evaluated
FALSEnever evaluated
0
16 ) + 1) - (size_t)(const void *)(
((size_t)(cons...string ) == 1)Description
TRUEnever evaluated
FALSEnever evaluated
0
17 string
((size_t)(cons...string ) == 1)Description
TRUEnever evaluated
FALSEnever evaluated
0
18 ) == 1)
((size_t)(cons...string ) == 1)Description
TRUEnever evaluated
FALSEnever evaluated
? (((const
((const char *... ))[0] == '\0'Description
TRUEnever evaluated
FALSEnever evaluated
char *) (
((const char *... ))[0] == '\0'Description
TRUEnever evaluated
FALSEnever evaluated
0
19 string
((const char *... ))[0] == '\0'Description
TRUEnever evaluated
FALSEnever evaluated
0
20 ))[0] == '\0'
((const char *... ))[0] == '\0'Description
TRUEnever evaluated
FALSEnever evaluated
? (char *) calloc ((size_t) 1, (size_t) 1) : ({ size_t __len = strlen (
0
21 string-
22 ) + 1; size_t __n = (-
23 n-
24 ); char *__retval; if (__n < __len
__n < __lenDescription
TRUEnever evaluated
FALSEnever evaluated
) __len = __n + 1;
never executed: __len = __n + 1;
__retval = (char *) malloc (__len); if (__retval != ((void *)0)
__retval != ((void *)0)Description
TRUEnever evaluated
FALSEnever evaluated
) { __retval[__len - 1] = '\0'; __retval = (char *) memcpy (__retval,
0
25 string-
26 , __len - 1); }
never executed: end of block
__retval; })) : __strndup (
0
27 string-
28 , -
29 n-
30 )))-
31 ;-
32 if (! s
! sDescription
TRUEnever evaluated
FALSEevaluated 726 times by 5 tests
Evaluated by:
  • basename
  • cut
  • dircolors
  • expand
  • numfmt
)
0-726
33 xalloc_die ();
never executed: xalloc_die ();
0
34 return
executed 726 times by 5 tests: return s;
Executed by:
  • basename
  • cut
  • dircolors
  • expand
  • numfmt
s;
executed 726 times by 5 tests: return s;
Executed by:
  • basename
  • cut
  • dircolors
  • expand
  • numfmt
726
35}-
Switch to Source codePreprocessed file

Generated by Squish Coco 4.1.2