2
0
mirror of https://gitlab.com/apparmor/apparmor synced 2025-08-30 22:05:27 +00:00

A small optimization used to calculate the size of the pathname

This commit is contained in:
John Johansen
2007-03-23 16:29:29 +00:00
parent 0060caec1a
commit 7c3e6cf525

View File

@@ -803,7 +803,7 @@ retry:
const char deleted_str[] = " (deleted)";
const size_t deleted_size = sizeof(deleted_str) - 1;
size_t size;
size = strlen(name);
size = (PAGE_SIZE - 1) - (name - page);
/* check for (deleted) that d_path appends to pathnames if
* the dentry has been removed from the cache.