| Absolute File Name: | /home/opencoverage/opencoverage/guest-scripts/bash/src/lib/readline/xmalloc.c |
| Switch to Source code | Preprocessed file |
| Line | Source | Count | ||||||
|---|---|---|---|---|---|---|---|---|
| 1 | - | |||||||
| 2 | - | |||||||
| 3 | - | |||||||
| 4 | - | |||||||
| 5 | - | |||||||
| 6 | - | |||||||
| 7 | - | |||||||
| 8 | - | |||||||
| 9 | - | |||||||
| 10 | - | |||||||
| 11 | - | |||||||
| 12 | - | |||||||
| 13 | - | |||||||
| 14 | - | |||||||
| 15 | - | |||||||
| 16 | static void | - | ||||||
| 17 | memory_error_and_abort (char *fname) | - | ||||||
| 18 | { | - | ||||||
| 19 | fprintf ( | - | ||||||
| 20 | stderr | - | ||||||
| 21 | , "%s: out of virtual memory\n", fname); | - | ||||||
| 22 | exit (2); never executed: exit (2); | 0 | ||||||
| 23 | } | - | ||||||
| 24 | - | |||||||
| 25 | - | |||||||
| 26 | - | |||||||
| 27 | - | |||||||
| 28 | void * | - | ||||||
| 29 | xmalloc (size_t bytes) | - | ||||||
| 30 | { | - | ||||||
| 31 | void * temp; | - | ||||||
| 32 | - | |||||||
| 33 | temp = malloc (bytes); | - | ||||||
| 34 | if (temp == 0
| 0 | ||||||
| 35 | memory_error_and_abort ("xmalloc"); never executed: memory_error_and_abort ("xmalloc"); | 0 | ||||||
| 36 | return never executed: (temp);return (temp);never executed: return (temp); | 0 | ||||||
| 37 | } | - | ||||||
| 38 | - | |||||||
| 39 | void * | - | ||||||
| 40 | xrealloc (void * pointer, size_t bytes) | - | ||||||
| 41 | { | - | ||||||
| 42 | void * temp; | - | ||||||
| 43 | - | |||||||
| 44 | temp = pointer
| 0 | ||||||
| 45 | - | |||||||
| 46 | if (temp == 0
| 0 | ||||||
| 47 | memory_error_and_abort ("xrealloc"); never executed: memory_error_and_abort ("xrealloc"); | 0 | ||||||
| 48 | return never executed: (temp);return (temp);never executed: return (temp); | 0 | ||||||
| 49 | } | - | ||||||
| Switch to Source code | Preprocessed file |