summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordrahn <drahn@openbsd.org>2001-08-09 02:42:12 +0000
committerdrahn <drahn@openbsd.org>2001-08-09 02:42:12 +0000
commiteef1d0e7e304f23ed6c533289026833db1b2be0e (patch)
tree72c10fac413340c88b68bc2a4b6753b47ea4383c
parentGrrr...here it is. (diff)
downloadwireguard-openbsd-eef1d0e7e304f23ed6c533289026833db1b2be0e.tar.xz
wireguard-openbsd-eef1d0e7e304f23ed6c533289026833db1b2be0e.zip
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.c4
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: