[RFC PATCH 08/12] [squash] pidns.c: use long for strtol result

Ákos Uzonyi uzonyi.akos at gmail.com
Fri Jun 12 14:33:52 UTC 2020


---
 pidns.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/pidns.c b/pidns.c
index 44bda6ed..401ca459 100644
--- a/pidns.c
+++ b/pidns.c
@@ -491,7 +491,7 @@ translate_id_dir(struct translate_id_params *tip, const char *path, bool read_ta
 			continue;
 
 		errno = 0;
-		int proc_pid = strtol(entry->d_name, NULL, 10);
+		long proc_pid = strtol(entry->d_name, NULL, 10);
 		if (errno)
 			continue;
 		if ((proc_pid < 1) || (proc_pid > INT_MAX))
-- 
2.27.0



More information about the Strace-devel mailing list