diff options
author | Artur Grabowski <art@cvs.openbsd.org> | 2001-05-31 10:16:31 +0000 |
---|---|---|
committer | Artur Grabowski <art@cvs.openbsd.org> | 2001-05-31 10:16:31 +0000 |
commit | 4144b5fd42e8441bc5d51c45c5de2babeb482a23 (patch) | |
tree | 8d2b8a1b49b8ddc42cb1c8303f3bd92e5647e042 /libexec/ld.so/sod.c | |
parent | 050a77f01ae14768664151fe06dc0220b576e76a (diff) |
When opening the hints file, check for error return < 0, not -1.
_dl_open is not necessarily like the regular open(2).
XXX - maybe we should check with _dl_check_error?
Diffstat (limited to 'libexec/ld.so/sod.c')
-rw-r--r-- | libexec/ld.so/sod.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libexec/ld.so/sod.c b/libexec/ld.so/sod.c index a5073fa26ba..fe2b51068f5 100644 --- a/libexec/ld.so/sod.c +++ b/libexec/ld.so/sod.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sod.c,v 1.3 2001/05/12 10:39:54 art Exp $ */ +/* $OpenBSD: sod.c,v 1.4 2001/05/31 10:16:30 art Exp $ */ /* * Copyright (c) 1993 Paul Kranenburg * All rights reserved. @@ -139,7 +139,7 @@ _dl_maphints() { caddr_t addr; - if ((hfd = _dl_open(_PATH_LD_HINTS, O_RDONLY)) == -1) { + if ((hfd = _dl_open(_PATH_LD_HINTS, O_RDONLY)) < 0) { hheader = (struct hints_header *)-1; return; } |