* @brief Adds an error to the HeadsetInfo struct * * @param info Headsetinfo struct * @param source Error source/key as string * @param message Error message */
| 53 | * @param message Error message |
| 54 | */ |
| 55 | static void addError(HeadsetInfo* info, const char* source, const char* message) |
| 56 | { |
| 57 | if (info->error_count < MAX_ERRORS) { |
| 58 | info->errors[info->error_count].source = strdup(source); |
| 59 | info->errors[info->error_count].message = strdup(message); |
| 60 | info->error_count++; |
| 61 | } else { |
| 62 | fprintf(stderr, "Error: addError MAX_ERRORS exceeded\n"); |
| 63 | abort(); |
| 64 | } |
| 65 | } |
| 66 | |
| 67 | /** |
| 68 | * @brief Adds an action to the HeadsetInfo struct |
no outgoing calls
no test coverage detected