From: Masatake YAMATO Date: Fri, 5 Jan 2024 01:26:35 +0000 (+0900) Subject: lsfd: (refactor) rename a local variable and a parameter X-Git-Tag: v2.42-start~502^2~3 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2d875b3c31b6d053ae758c99e16a12351797561f;p=thirdparty%2Futil-linux.git lsfd: (refactor) rename a local variable and a parameter Signed-off-by: Masatake YAMATO --- diff --git a/misc-utils/lsfd.c b/misc-utils/lsfd.c index f6a33fdba..1fbc028e4 100644 --- a/misc-utils/lsfd.c +++ b/misc-utils/lsfd.c @@ -1182,13 +1182,13 @@ static void process_mountinfo_entry(unsigned long major, unsigned long minor, add_nodev(minor, filesystem); } -static void read_mountinfo(FILE *mnt) +static void read_mountinfo(FILE *mountinfo) { /* This can be very long. A line in mountinfo can have more than 3 * paths. */ char line[PATH_MAX * 3 + 256]; - while (fgets(line, sizeof(line), mnt)) { + while (fgets(line, sizeof(line), mountinfo)) { unsigned long major, minor; char filesystem[256]; @@ -1808,12 +1808,12 @@ static void read_process(struct lsfd_control *ctl, struct path_cxt *pc, * The backing device for "nsfs" is solved here. */ if (proc->ns_mnt == NULL || !proc->ns_mnt->read_mountinfo) { - FILE *mnt = ul_path_fopen(pc, "r", "mountinfo"); - if (mnt) { - read_mountinfo(mnt); + FILE *mountinfo = ul_path_fopen(pc, "r", "mountinfo"); + if (mountinfo) { + read_mountinfo(mountinfo); if (proc->ns_mnt) proc->ns_mnt->read_mountinfo = true; - fclose(mnt); + fclose(mountinfo); } }