MCPcopy Create free account
hub / github.com/F-Stack/f-stack / pw_scan

Function pw_scan

tools/libutil/pw_util.c:668–684  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

666}
667
668struct passwd *
669pw_scan(const char *line, int flags)
670{
671 struct passwd pw, *ret;
672 char *bp;
673
674 if ((bp = strdup(line)) == NULL)
675 return (NULL);
676 __pw_initpwd(&pw);
677 if (!__pw_scan(bp, &pw, flags)) {
678 free(bp);
679 return (NULL);
680 }
681 ret = pw_dup(&pw);
682 free(bp);
683 return (ret);
684}

Callers 1

pw_copyFunction · 0.85

Calls 3

strdupFunction · 0.85
pw_dupFunction · 0.85
freeFunction · 0.50

Tested by

no test coverage detected