OpenCoverage

list.c

Absolute File Name:/home/opencoverage/opencoverage/guest-scripts/bash/src/list.c
Switch to Source codePreprocessed file
LineSourceCount
1-
2-
3-
4-
5-
6-
7-
8-
9-
10GENERIC_LIST global_error_list;-
11GENERIC_LIST *-
12list_reverse (list)-
13 GENERIC_LIST *list;-
14{-
15 register GENERIC_LIST *next, *prev;-
16-
17 for (prev = (GENERIC_LIST *)-
18 ((void *)0)-
19 ; list
listDescription
TRUEevaluated 195865297 times by 1 test
Evaluated by:
  • Self test
FALSEevaluated 66984411 times by 1 test
Evaluated by:
  • Self test
; )
66984411-195865297
20 {-
21 next = list->next;-
22 list->next = prev;-
23 prev = list;-
24 list = next;-
25 }
executed 195865297 times by 1 test: end of block
Executed by:
  • Self test
195865297
26 return
executed 66984411 times by 1 test: return (prev);
Executed by:
  • Self test
(prev);
executed 66984411 times by 1 test: return (prev);
Executed by:
  • Self test
66984411
27}-
28-
29-
30int-
31list_length (list)-
32 GENERIC_LIST *list;-
33{-
34 register int i;-
35-
36 for (i = 0; list
listDescription
TRUEevaluated 15283 times by 1 test
Evaluated by:
  • Self test
FALSEevaluated 4463 times by 1 test
Evaluated by:
  • Self test
; list = list->next, i++);
executed 15283 times by 1 test: ;
Executed by:
  • Self test
4463-15283
37 return
executed 4463 times by 1 test: return (i);
Executed by:
  • Self test
(i);
executed 4463 times by 1 test: return (i);
Executed by:
  • Self test
4463
38}-
39-
40-
41GENERIC_LIST *-
42list_append (head, tail)-
43 GENERIC_LIST *head, *tail;-
44{-
45 register GENERIC_LIST *t_head;-
46-
47 if (head == 0
head == 0Description
TRUEevaluated 9832 times by 1 test
Evaluated by:
  • Self test
FALSEevaluated 63631772 times by 1 test
Evaluated by:
  • Self test
)
9832-63631772
48 return
executed 9832 times by 1 test: return (tail);
Executed by:
  • Self test
(tail);
executed 9832 times by 1 test: return (tail);
Executed by:
  • Self test
9832
49-
50 for (t_head = head; t_head->next
t_head->nextDescription
TRUEevaluated 5422533 times by 1 test
Evaluated by:
  • Self test
FALSEevaluated 63631772 times by 1 test
Evaluated by:
  • Self test
; t_head = t_head->next)
5422533-63631772
51 ;
executed 5422533 times by 1 test: ;
Executed by:
  • Self test
5422533
52 t_head->next = tail;-
53 return
executed 63631772 times by 1 test: return (head);
Executed by:
  • Self test
(head);
executed 63631772 times by 1 test: return (head);
Executed by:
  • Self test
63631772
54}-
Switch to Source codePreprocessed file

Generated by Squish Coco 4.1.2