]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
lsfd: (refactor) rename a function, s/new_process/new_proc/g
authorMasatake YAMATO <yamato@redhat.com>
Tue, 23 Jan 2024 23:58:45 +0000 (08:58 +0900)
committerMasatake YAMATO <yamato@redhat.com>
Sun, 28 Jan 2024 17:10:42 +0000 (02:10 +0900)
Rename the function for making the name consistent with free_proc().

Signed-off-by: Masatake YAMATO <yamato@redhat.com>
misc-utils/lsfd.c

index d41f45c8e08e98f5cce708d9ff52a6705553f608..2d04f4c4ab2ae71a13a2cea32605c74a876a3e56 100644 (file)
@@ -741,7 +741,7 @@ static void free_file(struct file *file)
 }
 
 
-static struct proc *new_process(pid_t pid, struct proc *leader)
+static struct proc *new_proc(pid_t pid, struct proc *leader)
 {
        struct proc *proc = xcalloc(1, sizeof(*proc));
 
@@ -1664,7 +1664,7 @@ static void read_process(struct lsfd_control *ctl, struct path_cxt *pc,
        if (procfs_process_init_path(pc, pid) != 0)
                return;
 
-       proc = new_process(pid, leader);
+       proc = new_proc(pid, leader);
        proc->command = procfs_process_get_cmdname(pc, buf, sizeof(buf)) > 0 ?
                        xstrdup(buf) : xstrdup(_("(unknown)"));
        procfs_process_get_uid(pc, &proc->uid);