]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
lslocks: remove a unused local variable
authorMasatake YAMATO <yamato@redhat.com>
Fri, 12 Apr 2024 19:13:03 +0000 (04:13 +0900)
committerMasatake YAMATO <yamato@redhat.com>
Fri, 12 Apr 2024 19:23:08 +0000 (04:23 +0900)
Signed-off-by: Masatake YAMATO <yamato@redhat.com>
misc-utils/lslocks.c

index 60f6595a988ab96be98f744b102592e48958d967..176173f21104e8c582620201cebef496619c7c86 100644 (file)
@@ -490,12 +490,11 @@ static int get_pid_locks(void *locks, void (*add_lock)(void *, struct lock *), s
        return rc;
 }
 
-static int get_pids_locks(void *locks, void (*add_lock)(void *, struct lock *))
+static void get_pids_locks(void *locks, void (*add_lock)(void *, struct lock *))
 {
        DIR *dir;
        struct dirent *d;
        struct path_cxt *pc = NULL;
-       int rc = 0;
 
        pc = ul_new_path(NULL);
        if (!pc)
@@ -526,7 +525,7 @@ static int get_pids_locks(void *locks, void (*add_lock)(void *, struct lock *))
        closedir(dir);
        ul_unref_path(pc);
 
-       return rc;
+       return;
 }
 
 static int get_proc_locks(void *locks, void (*add_lock)(void *, struct lock *), void *fallback)