MCPcopy Create free account
hub / github.com/ElementsProject/lightning / to_string

Function to_string

tests/fuzz/libfuzz.c:46–55  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

44}
45
46char *to_string(const tal_t *ctx, const u8 *data, size_t data_size)
47{
48 char *string = tal_arr(ctx, char, data_size + 1);
49
50 for (size_t i = 0; i < data_size; i++)
51 string[i] = (char) data[i] % (CHAR_MAX + 1);
52 string[data_size] = '\0';
53
54 return string;
55}

Callers 3

runFunction · 0.70
runFunction · 0.70
runFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected