MCPcopy Create free account
hub / github.com/Sapd/HeadsetControl / addError

Function addError

src/output.c:55–65  ·  view source on GitHub ↗

* @brief Adds an error to the HeadsetInfo struct * * @param info Headsetinfo struct * @param source Error source/key as string * @param message Error message */

Source from the content-addressed store, hash-verified

53 * @param message Error message
54 */
55static 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

Callers 1

processFeatureRequestsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected