MCPcopy Index your code
hub / github.com/F-Stack/f-stack / gr_scan

Function gr_scan

tools/libutil/gr_util.c:645–664  ·  view source on GitHub ↗

* Create a struct group from a line. */

Source from the content-addressed store, hash-verified

643 * Create a struct group from a line.
644 */
645struct group *
646gr_scan(const char *line)
647{
648 struct group gr;
649 char *line_copy;
650 struct group *new_gr;
651
652 if ((line_copy = strdup(line)) == NULL)
653 return (NULL);
654 if (!__gr_scan(line_copy, &gr)) {
655 free(line_copy);
656 return (NULL);
657 }
658 new_gr = gr_dup(&gr);
659 free(line_copy);
660 if (gr.gr_mem != NULL)
661 free(gr.gr_mem);
662
663 return (new_gr);
664}

Callers 2

gr_copyFunction · 0.85
mainFunction · 0.85

Calls 4

strdupFunction · 0.85
__gr_scanFunction · 0.85
gr_dupFunction · 0.85
freeFunction · 0.50

Tested by 1

mainFunction · 0.68