about summary refs log tree commit diff
path: root/nss/nss_db/db-open.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2000-01-02 08:45:58 +0000
committerUlrich Drepper <drepper@redhat.com>2000-01-02 08:45:58 +0000
commit793bd4d9ebc5198ac292437227bec133fc6f4dfc (patch)
treefcac05d3fe6bd9e1e8ac94df7f3450929640ad12 /nss/nss_db/db-open.c
parent8d6f1731fcd082e4f744ba9cb4bde4be7c08f1b3 (diff)
downloadglibc-793bd4d9ebc5198ac292437227bec133fc6f4dfc.tar.gz
glibc-793bd4d9ebc5198ac292437227bec133fc6f4dfc.tar.xz
glibc-793bd4d9ebc5198ac292437227bec133fc6f4dfc.zip
Update.
2000-01-02  Ulrich Drepper  <drepper@cygnus.com>

	* nss/nss_db/nss_db.h: Add definitions needed for makedb.
	* nss/nss_db/dummy-db.h: Likewise.
	* nss/makedb.c: New file.  Copied from file in db2, modified to not
	depend on being linked against libdb.
Diffstat (limited to 'nss/nss_db/db-open.c')
-rw-r--r--nss/nss_db/db-open.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/nss/nss_db/db-open.c b/nss/nss_db/db-open.c
index 2d96ffdd1b..c3a0679485 100644
--- a/nss/nss_db/db-open.c
+++ b/nss/nss_db/db-open.c
@@ -57,14 +57,14 @@ load_db (void)
   static const char *libnames[] = { "libdb.so.3" };
   int x;
 
-  for(x = 0; x < 1; ++x)
+  for(x = 0; x < sizeof (libnames) / sizeof (libnames[0]); ++x)
     {
       libdb_handle = dlopen (libnames[x], RTLD_LAZY);
       if (libdb_handle == NULL)
 	continue;
 
       libdb_db_open = dlsym (libdb_handle, "db_open");
-      if (libdb_db_open)
+      if (libdb_db_open != NULL)
 	{
 	  /* Alright, we got a library.  Now find out which version it is.  */
 	  const char *(*db_version) (int *, int *, int *);