MCPcopy Create free account
hub / github.com/RT-Thread/rt-thread / _strvec_init

Function _strvec_init

components/lwp/lwp_args.c:21–27  ·  view source on GitHub ↗

* @brief Initializes a string vector structure with default buffer size * * @param[out] sv Pointer to the string vector structure to initialize */

Source from the content-addressed store, hash-verified

19 * @param[out] sv Pointer to the string vector structure to initialize
20 */
21static void _strvec_init(struct lwp_string_vector *sv)
22{
23 #define DEFAUTL_ARGV_BUFLEN 4
24 sv->strvec = rt_malloc(DEFAUTL_ARGV_BUFLEN * sizeof(char *));
25 sv->strvec_buflen = DEFAUTL_ARGV_BUFLEN;
26 sv->string_count = 0;
27}
28
29/**
30 * @brief Detaches and frees memory from a string vector structure

Callers 1

args_initFunction · 0.85

Calls 1

rt_mallocFunction · 0.85

Tested by

no test coverage detected