diff options
author | Dale Rahn <drahn@cvs.openbsd.org> | 2001-08-09 02:42:13 +0000 |
---|---|---|
committer | Dale Rahn <drahn@cvs.openbsd.org> | 2001-08-09 02:42:13 +0000 |
commit | b49cc33832707e782fb970ab90e984cc394fb6a2 (patch) | |
tree | 60072df781987ade40ed9e31032d6875e88a6b71 | |
parent | b3ce36971c85857c78ee42a543a74e0082d9759e (diff) |
It seems bogus to me, but if code call dlerror() when an error has
not occurred, there exists code that expects dlerror to return NULL.
Change the code to match the expected behavior.
-rw-r--r-- | libexec/ld.so/dlfcn.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libexec/ld.so/dlfcn.c b/libexec/ld.so/dlfcn.c index 025ae5866d3..e42d7b895de 100644 --- a/libexec/ld.so/dlfcn.c +++ b/libexec/ld.so/dlfcn.c @@ -1,4 +1,4 @@ -/* $OpenBSD: dlfcn.c,v 1.6 2001/06/06 12:45:17 art Exp $ */ +/* $OpenBSD: dlfcn.c,v 1.7 2001/08/09 02:42:12 drahn Exp $ */ /* * Copyright (c) 1998 Per Fogelstrom, Opsycon AB @@ -234,6 +234,8 @@ const char * dlerror() { switch (_dl_errno) { + case 0: /* NO ERROR */ + return (NULL); case DL_NOT_FOUND: return ("File not found"); case DL_CANT_OPEN: |