From 229aadf194c88b79fb6e218aa36d3295592043c4 Mon Sep 17 00:00:00 2001 From: Andrew Wood Date: Mon, 11 May 2026 20:43:45 +0100 Subject: [PATCH] Make the struct dirent a const (cppcheck recommendation). --- src/pv/watchpid.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pv/watchpid.c b/src/pv/watchpid.c index faddbd4..cbc1d2b 100644 --- a/src/pv/watchpid.c +++ b/src/pv/watchpid.c @@ -559,7 +559,7 @@ int pv_watchpid_scanfds(pvstate_t state, pid_t watch_pid, int watch_fd, int *arr #else nullable_string_ptr fd_dir = NULL; DIR *dptr; - struct dirent *d; + const struct dirent *d; if ((pv_asprintf(&fd_dir, "/proc/%u/fd", watch_pid) < 0) || (NULL == fd_dir)) { pv_perror("%s %u", _("pid"), watch_pid);