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

Function make_mask

access.c:85–100  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

83}
84
85static void make_mask(char *mask, int plen, int addrlen)
86{
87 int w, b;
88
89 w = plen >> 3;
90 b = plen & 0x7;
91
92 if (w)
93 memset(mask, 0xff, w);
94 if (w < addrlen)
95 mask[w] = 0xff & (0xff<<(8-b));
96 if (w+1 < addrlen)
97 memset(mask+w+1, 0, addrlen-w-1);
98
99 return;
100}
101
102static int match_address(const char *addr, char *tok)
103{

Callers 1

match_addressFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected