MCPcopy Create free account
hub / github.com/RsyncProject/rsync / string_set

Function string_set

loadparm.c:263–266  ·  view source on GitHub ↗

Assign a copy of v to *s. Handles NULL strings. We don't worry * about overwriting a malloc'd string because the long-running * (port-listening) daemon only loads the config file once, and the * per-job (forked or xinitd-ran) daemon only re-reads the file at * the start, so any lost memory is inconsequential. */

Source from the content-addressed store, hash-verified

261 * per-job (forked or xinitd-ran) daemon only re-reads the file at
262 * the start, so any lost memory is inconsequential. */
263static inline void string_set(char **s, const char *v)
264{
265 *s = v ? strdup(v) : NULL;
266}
267
268/* Copy local_vars into a new section. No need to strdup since we don't free. */
269static void copy_section(local_vars *psectionDest, local_vars *psectionSource)

Callers 2

add_a_sectionFunction · 0.85
do_parameterFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected