MCPcopy Index your code
hub / github.com/RsyncProject/rsync / set_env_str

Function set_env_str

clientserver.c:445–461  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

443#endif
444
445void set_env_str(const char *var, const char *str)
446{
447#ifdef HAVE_SETENV
448 if (setenv(var, str, 1) < 0)
449 out_of_memory("set_env_str");
450#else
451#ifdef HAVE_PUTENV
452 char *mem;
453 if (asprintf(&mem, "%s=%s", var, str) < 0)
454 out_of_memory("set_env_str");
455 putenv(mem);
456#else
457 (void)var;
458 (void)str;
459#endif
460#endif
461}
462
463#if defined HAVE_SETENV || defined HAVE_PUTENV
464

Callers 3

mainFunction · 0.85
start_pre_execFunction · 0.85
rsync_moduleFunction · 0.85

Calls 1

asprintfFunction · 0.85

Tested by

no test coverage detected