Grow s_arr by one slot and append the staged entry. False on OOM
| 23 | |
| 24 | // Grow s_arr by one slot and append the staged entry. False on OOM |
| 25 | static bool entry_append(void) { |
| 26 | struct entry *arr = |
| 27 | (struct entry *) realloc(s_arr, (s_count + 1) * sizeof(*arr)); |
| 28 | if (arr == NULL) return false; |
| 29 | s_arr = arr; |
| 30 | s_arr[s_count++] = s_entry; |
| 31 | return true; |
| 32 | } |
| 33 | |
| 34 | // Remove the entry at the given index, shifting the tail down and shrinking |
| 35 | // s_arr by one slot. False if the index is out of range |
no outgoing calls
no test coverage detected