]> git.ipfire.org Git - thirdparty/shadow.git/commitdiff
lib: apply linux specific pid_t format consistently master
authorTobias Deiminger <tobias.deiminger@linutronix.de>
Thu, 7 May 2026 20:47:24 +0000 (22:47 +0200)
committerAlejandro Colomar <foss+github@alejandro-colomar.es>
Tue, 19 May 2026 12:46:55 +0000 (14:46 +0200)
Also change previously existing linux specific format for pid_t to %d.

Signed-off-by: Tobias Deiminger <tobias.deiminger@linutronix.de>
lib/user_busy.c

index aea16b13bcf50254c8020876d45eb9c93e9d8eb9..2f21ca0993594d4841daa00a6a2e500ada9afc99 100644 (file)
@@ -216,7 +216,7 @@ static int user_busy_processes (const char *name, uid_t uid)
                }
 
                /* Check if the process is in our chroot */
-               stprintf_a(root_path, "/proc/%lu/root", (unsigned long) pid);
+               stprintf_a(root_path, "/proc/%d/root", pid);
                if (stat (root_path, &sbroot_process) != 0) {
                        continue;
                }
@@ -236,7 +236,7 @@ static int user_busy_processes (const char *name, uid_t uid)
                        return 1;
                }
 
-               stprintf_a(task_path, "/proc/%lu/task", (unsigned long) pid);
+               stprintf_a(task_path, "/proc/%d/task", pid);
                task_dir = opendir (task_path);
                if (task_dir != NULL) {
                        while (NULL != (ent = readdir(task_dir))) {