提交 f96d055e 编写于 作者: H Hartmut Knaack 提交者: Jonathan Cameron

tools:iio:lsiio: add closedir before exit

In dump_channels() the DIR *dp was left open on exit. Close it and check
for errors.
Signed-off-by: NHartmut Knaack <knaack.h@gmx.de>
Signed-off-by: NJonathan Cameron <jic23@kernel.org>
上级 121b5e50
......@@ -56,7 +56,7 @@ static int dump_channels(const char *dev_dir_name)
printf(" %-10s\n", ent->d_name);
}
return 0;
return (closedir(dp) == -1) ? -errno : 0;
}
static int dump_one_device(const char *dev_dir_name)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册