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

Function unescape_inline

bind-mount.c:39–66  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

37}
38
39static char *
40unescape_inline (char *escaped)
41{
42 char *unescaped, *res;
43 const char *end;
44
45 res = escaped;
46 end = escaped + strlen (escaped);
47
48 unescaped = escaped;
49 while (escaped < end)
50 {
51 if (*escaped == '\\')
52 {
53 *unescaped++ =
54 ((escaped[1] - '0') << 6) |
55 ((escaped[2] - '0') << 3) |
56 ((escaped[3] - '0') << 0);
57 escaped += 4;
58 }
59 else
60 {
61 *unescaped++ = *escaped++;
62 }
63 }
64 *unescaped = 0;
65 return res;
66}
67
68static bool
69match_token (const char *token, const char *token_end, const char *str)

Callers 1

parse_mountinfoFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected