Skip to content

Commit a236c0d

Browse files
committed
linux.pagecache.Files: Trim unneeded cast
Removes casts to `int` performed before checking set membership, since the computed `__hash__` value will be the same for both the Python primitive and the volatility `objects.Pointer`.
1 parent 9ceec51 commit a236c0d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

volatility3/framework/plugins/linux/pagecache.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ def get_inodes(
287287
# addresses we've already seen. Storing the full `objects.Pointer`
288288
# uses too much memory, and we don't need all of the information
289289
# that it contains.
290-
if int(root_inode_ptr) in seen_inodes:
290+
if root_inode_ptr in seen_inodes:
291291
continue
292292

293293
seen_inodes.add(int(root_inode_ptr))
@@ -327,7 +327,7 @@ def get_inodes(
327327
# addresses we've already seen. Storing the full `objects.Pointer`
328328
# uses too much memory, and we don't need all of the information
329329
# that it contains.
330-
if int(file_inode_ptr) in seen_inodes:
330+
if file_inode_ptr in seen_inodes:
331331
continue
332332
seen_inodes.add(int(file_inode_ptr))
333333

0 commit comments

Comments
 (0)