MCPcopy Create free account
hub / github.com/containers/bubblewrap / count_lines

Function count_lines

bind-mount.c:168–186  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

166};
167
168static unsigned int
169count_lines (const char *data)
170{
171 unsigned int count = 0;
172 const char *p = data;
173
174 while (*p != 0)
175 {
176 if (*p == '\n')
177 count++;
178 p++;
179 }
180
181 /* If missing final newline, add one */
182 if (p > data && *(p-1) != '\n')
183 count++;
184
185 return count;
186}
187
188static int
189count_mounts (MountInfoLine *line)

Callers 1

parse_mountinfoFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected