From 3e2d73532812ab4f3b5cce11cf5dcc5a57af9163 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Tue, 28 Mar 2023 18:44:40 +0200 Subject: [PATCH] basic/stat-util: remove unused null_or_empty_fd() --- src/basic/stat-util.c | 11 ----------- src/basic/stat-util.h | 1 - 2 files changed, 12 deletions(-) diff --git a/src/basic/stat-util.c b/src/basic/stat-util.c index 150605e86d..6eaa3da459 100644 --- a/src/basic/stat-util.c +++ b/src/basic/stat-util.c @@ -152,17 +152,6 @@ int null_or_empty_path_with_root(const char *fn, const char *root) { return null_or_empty(&st); } -int null_or_empty_fd(int fd) { - struct stat st; - - assert(fd >= 0); - - if (fstat(fd, &st) < 0) - return -errno; - - return null_or_empty(&st); -} - static int fd_is_read_only_fs(int fd) { struct statvfs st; diff --git a/src/basic/stat-util.h b/src/basic/stat-util.h index 4bf15a731d..24684d5794 100644 --- a/src/basic/stat-util.h +++ b/src/basic/stat-util.h @@ -30,7 +30,6 @@ static inline int dir_is_empty(const char *path, bool ignore_hidden_or_backup) { bool null_or_empty(struct stat *st) _pure_; int null_or_empty_path_with_root(const char *fn, const char *root); -int null_or_empty_fd(int fd); static inline int null_or_empty_path(const char *fn) { return null_or_empty_path_with_root(fn, NULL); -- 2.25.1