test/inhfd: remove redundant mnt_id initialization

Remove C-style pre-initialization of mnt_id to -1. The
variable is always assigned inside the loop, and the for/else
construct raises an exception if it is never set.

Assisted-by: Claude Code (claude-opus-4-6)
Signed-off-by: Adrian Reber <areber@redhat.com>
This commit is contained in:
Adrian Reber 2026-07-07 19:52:14 +00:00 committed by Radostin Stoyanov
parent d85af7219a
commit 1e2f7b55aa

View file

@ -15,7 +15,6 @@ def create_fds():
os.system("umount -l %s" % tdir)
os.rmdir(tdir)
mnt_id = -1
with open("/proc/self/fdinfo/%d" % fd1.fileno()) as f:
for line in f:
line = line.split()