diff options
author | Claudio Jeker <claudio@cvs.openbsd.org> | 2024-01-16 13:07:30 +0000 |
---|---|---|
committer | Claudio Jeker <claudio@cvs.openbsd.org> | 2024-01-16 13:07:30 +0000 |
commit | 7dc9010a196a17297606d46205c628ca3d32d8fb (patch) | |
tree | 1cf4c1cb37f0f79cb9dc8b75c700ae810abd4f1d /usr.bin/file | |
parent | 321a598afd646cc8f7c14c827a9f8750bc150e50 (diff) |
Use imsg_get_fd() and adjust cleanup code accordingly.
OK nicm@
Diffstat (limited to 'usr.bin/file')
-rw-r--r-- | usr.bin/file/file.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/usr.bin/file/file.c b/usr.bin/file/file.c index 3183adb484d..9fb35dba3b6 100644 --- a/usr.bin/file/file.c +++ b/usr.bin/file/file.c @@ -1,4 +1,4 @@ -/* $OpenBSD: file.c,v 1.69 2019/11/30 14:01:45 mestre Exp $ */ +/* $OpenBSD: file.c,v 1.70 2024/01/16 13:07:29 claudio Exp $ */ /* * Copyright (c) 2015 Nicholas Marriott <nicm@openbsd.org> @@ -418,12 +418,12 @@ child(int fd, pid_t parent, int argc, char **argv) inf.msg = msg; inf.path = argv[idx]; - inf.fd = imsg.fd; + inf.fd = imsg_get_fd(&imsg); test_file(&inf, width); - if (imsg.fd != -1) - close(imsg.fd); + if (inf.fd != -1) + close(inf.fd); imsg_free(&imsg); ack.idx = idx; |