From bf934b33c0b041dd5fd94843d0f2a73a138aa67c 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 627f7df718..6995397670 100644 --- a/lib/fluent/plugin/in_tail.rb +++ b/lib/fluent/plugin/in_tail.rb @@ -409,8 +409,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 @@ -419,7 +418,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