summaryrefslogtreecommitdiff
path: root/src/basic
diff options
context:
space:
mode:
authorDavid Tardon <dtardon@redhat.com>2023-05-05 09:10:49 +0200
committerDavid Tardon <dtardon@redhat.com>2023-05-05 09:10:56 +0200
commite652663a043cb80936bb12ad5c87766fc5150c24 (patch)
tree0be9d85c11057f6b66b3f4604c27fd85051a7599 /src/basic
parent754d8b9c330150fdb3767491e24975f7dfe2a203 (diff)
downloadsystemd-e652663a043cb80936bb12ad5c87766fc5150c24.tar.gz
tree-wide: use parse_fd()
Diffstat (limited to 'src/basic')
-rw-r--r--src/basic/fd-util.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/basic/fd-util.c b/src/basic/fd-util.c
index 974a7aac65..907bfeb600 100644
--- a/src/basic/fd-util.c
+++ b/src/basic/fd-util.c
@@ -416,7 +416,8 @@ int close_all_fds(const int except[], size_t n_except) {
if (!IN_SET(de->d_type, DT_LNK, DT_UNKNOWN))
continue;
- if (safe_atoi(de->d_name, &fd) < 0)
+ fd = parse_fd(de->d_name);
+ if (fd < 0)
/* Let's better ignore this, just in case */
continue;