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

Function add_a_section

loadparm.c:320–340  ·  view source on GitHub ↗

Add a new section to the sections array w/the default values. */

Source from the content-addressed store, hash-verified

318
319/* Add a new section to the sections array w/the default values. */
320static int add_a_section(char *name)
321{
322 int i;
323 local_vars *s;
324
325 /* it might already exist */
326 if (name) {
327 i = getsectionbyname(name);
328 if (i >= 0)
329 return i;
330 }
331
332 i = section_list.count;
333 s = EXPAND_ITEM_LIST(&section_list, local_vars, 2);
334
335 init_section(s);
336 if (name)
337 string_set(&s->name, name);
338
339 return i;
340}
341
342/* Map a parameter's string representation to something we can use.
343 * Returns False if the parameter string is not recognised, else TRUE. */

Callers 1

do_sectionFunction · 0.85

Calls 3

getsectionbynameFunction · 0.85
init_sectionFunction · 0.85
string_setFunction · 0.85

Tested by

no test coverage detected