diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1996-06-14 05:01:37 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1996-06-14 05:01:37 +0000 |
commit | 685d2666a544322370a7d281966b8c23f17ecd8b (patch) | |
tree | 0b2fb4f792ecef51e4080ed363bb984229a37a59 /lib/libc/gen/nlist.c | |
parent | d21dcfc31ef71322124b54fb4a1e8ea5a0abbc83 (diff) |
if no executable formats are defined for the architecture, it should
nlist should return -1 (not garbage). Guess how I found this bug.
Diffstat (limited to 'lib/libc/gen/nlist.c')
-rw-r--r-- | lib/libc/gen/nlist.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/libc/gen/nlist.c b/lib/libc/gen/nlist.c index 00e57ff6732..535ac5bb690 100644 --- a/lib/libc/gen/nlist.c +++ b/lib/libc/gen/nlist.c @@ -1,4 +1,4 @@ -/* $OpenBSD: nlist.c,v 1.10 1996/05/30 16:16:53 pefo Exp $ */ +/* $OpenBSD: nlist.c,v 1.11 1996/06/14 05:01:36 deraadt Exp $ */ /* $NetBSD: nlist.c,v 1.7 1996/05/16 20:49:20 cgd Exp $ */ /* @@ -35,7 +35,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: nlist.c,v 1.10 1996/05/30 16:16:53 pefo Exp $"; +static char rcsid[] = "$OpenBSD: nlist.c,v 1.11 1996/06/14 05:01:36 deraadt Exp $"; #endif /* LIBC_SCCS and not lint */ #include <sys/types.h> @@ -433,7 +433,7 @@ __fdnlist(fd, list) register int fd; register struct nlist *list; { - int n, i; + int n = -1, i; for (i = 0; i < sizeof(nlist_fn)/sizeof(nlist_fn[0]); i++) { n = (nlist_fn[i].fn)(fd, list); |