Make the struct dirent a const (cppcheck recommendation).

This commit is contained in:
Andrew Wood
2026-05-11 20:43:45 +01:00
parent 6b0f8477d0
commit 229aadf194
+1 -1
View File
@@ -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);