MCPcopy Create free account
hub / github.com/coreboot/coreboot / add_target

Function add_target

util/msrtool/msrtool.c:77–88  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

75}
76
77static void *add_target(const struct targetdef *t) {
78 void *tmp;
79 tmp = realloc(targets, (targets_found + 2) * sizeof(struct targetdef *));
80 if (NULL == tmp) {
81 perror("realloc");
82 return tmp;
83 }
84 targets = tmp;
85 targets[targets_found++] = t;
86 targets[targets_found] = NULL;
87 return targets;
88}
89
90static int found_system(void) {
91 if (!sys || (sys && !sys->name)) {

Callers 1

mainFunction · 0.85

Calls 2

reallocFunction · 0.85
perrorFunction · 0.85

Tested by

no test coverage detected