Skip to content
Snippets Groups Projects
Commit af79d6e3 authored by Kurt Zeilenga's avatar Kurt Zeilenga
Browse files

Add some error check to be DB_thread checks

parent d7d20254
No related branches found
No related tags found
No related merge requests found
......@@ -354,22 +354,26 @@ main()
#ifdef DB_CDB_ALLDB
rc = env->set_flags( env, DB_CDB_ALLDB, 1 );
if( rc ) goto done;
if( rc == 0 )
#endif
{
#if (DB_VERSION_MAJOR > 3) || (DB_VERSION_MINOR >= 1)
rc = env->open( env, NULL, flags, 0 );
rc = env->open( env, NULL, flags, 0 );
#else
rc = env->open( env, NULL, NULL, flags, 0 );
rc = env->open( env, NULL, NULL, flags, 0 );
#endif
}
if( rc ) {
printf("BerkeleyDB: %s\n", db_strerror(rc) );
return rc;
}
#ifdef DB_CDB_ALLDB
done:
#endif
#if (DB_VERSION_MAJOR > 3) || (DB_VERSION_MINOR >= 1)
env->remove( env, NULL, DB_FORCE);
env->remove( env, NULL, DB_FORCE );
#else
env->remove( env, NULL, NULL, DB_FORCE);
env->remove( env, NULL, NULL, DB_FORCE );
#endif
#else
......
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment