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

Function id_parse

uidlist.c:76–94  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

74}
75
76static id_t id_parse(const char *num_str)
77{
78 id_t tmp, num = 0;
79 const char *cp = num_str;
80
81 while (*cp) {
82 if (!isDigit(cp)) {
83 invalid_num:
84 rprintf(FERROR, "Invalid ID number: %s\n", num_str);
85 exit_cleanup(RERR_SYNTAX);
86 }
87 tmp = num * 10 + *cp++ - '0';
88 if (tmp < num)
89 goto invalid_num;
90 num = tmp;
91 }
92
93 return num;
94}
95
96static struct idlist *add_to_list(struct idlist **root, id_t id, union name_or_id noiu,
97 id_t id2, uint16 flags)

Callers 3

user_to_uidFunction · 0.85
group_to_gidFunction · 0.85
parse_name_mapFunction · 0.85

Calls 2

isDigitFunction · 0.85
rprintfFunction · 0.70

Tested by

no test coverage detected