summaryrefslogtreecommitdiff
path: root/src/sd-daemon.c
diff options
context:
space:
mode:
authorMartin Mikkelsen <mamikk@mamikk.no>2010-07-06 23:27:56 +0200
committerLennart Poettering <lennart@poettering.net>2010-07-07 01:41:59 +0200
commitfd8bccfbf9e50a7a0a209867130aac434e0754e7 (patch)
tree58a85ad5a278461b5875a178ccf398b4829a1b31 /src/sd-daemon.c
parentf3e219a238c716ffa06fab7b0618197c090dfd5a (diff)
sd-daemon: Fix path check in sd_is_fifo()
sd_is_fifo() did fstat on the file descriptor twice instead of stating the supplied path.
Diffstat (limited to 'src/sd-daemon.c')
-rw-r--r--src/sd-daemon.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/sd-daemon.c b/src/sd-daemon.c
index cb568b5e65..5df70e38d5 100644
--- a/src/sd-daemon.c
+++ b/src/sd-daemon.c
@@ -141,7 +141,7 @@ int sd_is_fifo(int fd, const char *path) {
struct stat st_path;
memset(&st_path, 0, sizeof(st_path));
- if (fstat(fd, &st_path) < 0) {
+ if (stat(path, &st_path) < 0) {
if (errno == ENOENT || errno == ENOTDIR)
return 0;