MCPcopy Index your code
hub / github.com/git/git / getpw_str

Function getpw_str

path.c:680–687  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

678}
679
680static struct passwd *getpw_str(const char *username, size_t len)
681{
682 struct passwd *pw;
683 char *username_z = xmemdupz(username, len);
684 pw = getpwnam(username_z);
685 free(username_z);
686 return pw;
687}
688
689/*
690 * Return a string with ~ and ~user expanded via getpw*. Returns NULL on getpw

Callers 1

interpolate_pathFunction · 0.85

Calls 2

xmemdupzFunction · 0.85
getpwnamFunction · 0.85

Tested by

no test coverage detected