MCPcopy Create free account
hub / github.com/OpenIPC/firmware / add_path

Function add_path

general/package/legacy/lshell/src/lshell.c:23–28  ·  view source on GitHub ↗

* @brief Adds a path to the list of paths to look for executables in * * @param path */

Source from the content-addressed store, hash-verified

21 * @param path
22 */
23void add_path(char *path)
24{
25 paths[paths_c] = (char *)malloc(sizeof(char) * strlen(path) + 1);
26 strcpy(paths[paths_c++], path);
27 paths = realloc(paths, (paths_c + 1) * sizeof(char *));
28}
29
30/**
31 * @brief Initializes the list of paths and adds the DEFAULT_PATH

Callers 1

handle_cmdFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected