summaryrefslogtreecommitdiffstats
path: root/usr.bin/file/file.c
diff options
context:
space:
mode:
authornicm <nicm@openbsd.org>2015-05-29 07:30:28 +0000
committernicm <nicm@openbsd.org>2015-05-29 07:30:28 +0000
commit449bd205f4ea14c95f4b3670ab23c2dbe994a93e (patch)
tree936d0394021d3ebe33c0ee2851d4bbd6b027ec3f /usr.bin/file/file.c
parentSprinkle END() in some straightforward *.S files that have ENTRY(). The (diff)
downloadwireguard-openbsd-449bd205f4ea14c95f4b3670ab23c2dbe994a93e.tar.xz
wireguard-openbsd-449bd205f4ea14c95f4b3670ab23c2dbe994a93e.zip
Silently fall back to /etc/magic if ~/.magic can't be opened, ok deraadt stsp
Diffstat (limited to 'usr.bin/file/file.c')
-rw-r--r--usr.bin/file/file.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/usr.bin/file/file.c b/usr.bin/file/file.c
index fb7c7b88516..961b77148d5 100644
--- a/usr.bin/file/file.c
+++ b/usr.bin/file/file.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: file.c,v 1.39 2015/05/28 19:26:37 jmc Exp $ */
+/* $OpenBSD: file.c,v 1.40 2015/05/29 07:30:28 nicm Exp $ */
/*
* Copyright (c) 2015 Nicholas Marriott <nicm@openbsd.org>
@@ -174,8 +174,6 @@ main(int argc, char **argv)
if (home != NULL) {
xasprintf(&magicpath, "%s/.magic", home);
magicfp = fopen(magicpath, "r");
- if (magicfp == NULL && errno != ENOENT)
- err(1, "%s", magicpath);
if (magicfp == NULL)
free(magicpath);
}