namei: simplify code
Signed-off-by: Karel Zak <kzak@redhat.com>
This commit is contained in:
parent
19f2cebd48
commit
403cd1086e
|
@ -99,7 +99,7 @@ readlink_to_namei(struct namei *nm, const char *path)
|
||||||
}
|
}
|
||||||
nm->abslink = xmalloc(sz + 1);
|
nm->abslink = xmalloc(sz + 1);
|
||||||
|
|
||||||
if (*sym != '/' && isrel) {
|
if (isrel) {
|
||||||
/* create the absolute path from the relative symlink */
|
/* create the absolute path from the relative symlink */
|
||||||
memcpy(nm->abslink, path, nm->relstart);
|
memcpy(nm->abslink, path, nm->relstart);
|
||||||
*(nm->abslink + nm->relstart) = '/';
|
*(nm->abslink + nm->relstart) = '/';
|
||||||
|
|
Loading…
Reference in New Issue