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

Function str_append

util/kconfig/util.c:51–62  ·  view source on GitHub ↗

Append to growable string */

Source from the content-addressed store, hash-verified

49
50/* Append to growable string */
51void str_append(struct gstr *gs, const char *s)
52{
53 size_t l;
54 if (s) {
55 l = strlen(gs->s) + strlen(s) + 1;
56 if (l > gs->len) {
57 gs->s = xrealloc(gs->s, l);
58 gs->len = l;
59 }
60 strcat(gs->s, s);
61 }
62}
63
64/* Append printf formatted string to growable string */
65void str_printf(struct gstr *gs, const char *fmt, ...)

Callers 7

expr_print_gstr_helperFunction · 0.85
str_printfFunction · 0.85
get_dep_strFunction · 0.85
get_prompt_strFunction · 0.85
get_symbol_props_strFunction · 0.85
get_symbol_strFunction · 0.85
get_relations_strFunction · 0.85

Calls 3

strlenFunction · 0.85
xreallocFunction · 0.85
strcatFunction · 0.85

Tested by

no test coverage detected