packagefs: Rename isNewest to overridesHead.

As pointed out by Adrien. Thanks for the review!

Also fixed missing dereference operators.
This commit is contained in:
Augustin Cavalier 2018-08-06 23:46:24 -04:00
parent 023a547dc6
commit 247f2fb691
2 changed files with 4 additions and 5 deletions

View File

@ -108,9 +108,9 @@ UnpackingDirectory::AddPackageNode(PackageNode* packageNode, dev_t deviceID)
= dynamic_cast<PackageDirectory*>(packageNode); = dynamic_cast<PackageDirectory*>(packageNode);
PackageDirectory* other = fPackageDirectories.Head(); PackageDirectory* other = fPackageDirectories.Head();
bool isNewest = other == NULL || *packageDirectory > *other; bool overridesHead = other == NULL || *packageDirectory > *other;
if (isNewest) { if (overridesHead) {
fPackageDirectories.Insert(other, packageDirectory); fPackageDirectories.Insert(other, packageDirectory);
NodeReinitVFS(deviceID, fID, packageDirectory, other, fFlags); NodeReinitVFS(deviceID, fID, packageDirectory, other, fFlags);
} else } else

View File

@ -116,10 +116,9 @@ UnpackingLeafNode::AddPackageNode(PackageNode* packageNode, dev_t deviceID)
= dynamic_cast<PackageLeafNode*>(packageNode); = dynamic_cast<PackageLeafNode*>(packageNode);
PackageLeafNode* headNode = fPackageNodes.Head(); PackageLeafNode* headNode = fPackageNodes.Head();
bool isNewest = headNode == NULL bool overridesHead = headNode == NULL || *packageLeafNode > *headNode;
|| packageLeafNode > headNode;
if (isNewest) { if (overridesHead) {
fPackageNodes.Add(packageLeafNode); fPackageNodes.Add(packageLeafNode);
NodeReinitVFS(deviceID, fID, packageLeafNode, headNode, fFlags); NodeReinitVFS(deviceID, fID, packageLeafNode, headNode, fFlags);
} else { } else {