mirror of
https://github.com/checkpoint-restore/criu.git
synced 2026-07-25 02:58:54 +00:00
criu/mount.c: rm unused function
Commit 308741d removes all calls to path_length(), but the function
itself is still there. Now, clang complains that it is unused.
Remove it.
Signed-off-by: Kir Kolyshkin <kir@openvz.org>
Signed-off-by: Pavel Emelyanov <xemul@virtuozzo.com>
This commit is contained in:
parent
02c3605c02
commit
e48a46f377
1 changed files with 0 additions and 19 deletions
19
criu/mount.c
19
criu/mount.c
|
|
@ -556,25 +556,6 @@ static struct mount_info *find_shared_peer(struct mount_info *m,
|
|||
return NULL;
|
||||
}
|
||||
|
||||
static inline int path_length(char *path)
|
||||
{
|
||||
int off;
|
||||
|
||||
off = strlen(path);
|
||||
/*
|
||||
* If we're pure / then set length to zero so that adding this
|
||||
* value as sub-path offset would produce the correct result.
|
||||
* E.g. the tail path of the "/foo/bar" relative to the "/foo"
|
||||
* will be the "/foo/bar" + len("/foo") == "/bar", while the
|
||||
* same relative to the "/" should be +0 to be the "/foo/bar",
|
||||
* not +1 and the "foo/bar".
|
||||
*/
|
||||
if (path[off - 1] == '/')
|
||||
off--;
|
||||
|
||||
return off;
|
||||
}
|
||||
|
||||
static int validate_shared(struct mount_info *m)
|
||||
{
|
||||
struct mount_info *t, *ct;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue