From be5e767b619aebbf5d85d2abac7d3495e96f1c99 Mon Sep 17 00:00:00 2001 From: Takuro Ashie Date: Thu, 26 Aug 2021 11:56:18 +0900 Subject: [PATCH] in_tail: Remove a needless local variable Signed-off-by: Takuro Ashie --- lib/fluent/plugin/in_tail.rb | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/fluent/plugin/in_tail.rb b/lib/fluent/plugin/in_tail.rb index 7a9b53d529..2a0350aa14 100644 --- a/lib/fluent/plugin/in_tail.rb +++ b/lib/fluent/plugin/in_tail.rb @@ -424,8 +424,7 @@ def construct_watcher(target_info) # The file might be rotated or removed after collecting paths, so check inode again here. begin - ino = Fluent::FileWrapper.stat(path).ino - target_info.ino = ino + target_info.ino = Fluent::FileWrapper.stat(path).ino rescue Errno::ENOENT, Errno::EACCES $log.warn "stat() for #{path} failed. Continuing without tailing it." return @@ -434,7 +433,7 @@ def construct_watcher(target_info) pe = nil if @pf pe = @pf[target_info] - pe.update(ino, 0) if @read_from_head && pe.read_inode.zero? + pe.update(target_info.ino, 0) if @read_from_head && pe.read_inode.zero? end begin