envname = argv[optind];
rc = mdb_env_create(&env);
+ if (rc) {
+ fprintf(stderr, "mdb_env_create failed, error %d %s\n", rc, mdb_strerror(rc));
+ return EXIT_FAILURE;
+ }
if (alldbs || subname) {
mdb_env_set_maxdbs(env, 2);
{ 0, NULL, 0 }
};
-static const char hexc[] = "0123456789abcdef";
-
static void readhdr(void)
{
char *ptr;
envname = argv[optind];
rc = mdb_env_create(&env);
+ if (rc) {
+ fprintf(stderr, "mdb_env_create failed, error %d %s\n", rc, mdb_strerror(rc));
+ return EXIT_FAILURE;
+ }
mdb_env_set_maxdbs(env, 2);
envname = argv[optind];
rc = mdb_env_create(&env);
+ if (rc) {
+ fprintf(stderr, "mdb_env_create failed, error %d %s\n", rc, mdb_strerror(rc));
+ return EXIT_FAILURE;
+ }
if (alldbs || subname) {
mdb_env_set_maxdbs(env, 4);
}
if (envinfo) {
- rc = mdb_env_stat(env, &mst);
- rc = mdb_env_info(env, &mei);
+ (void)mdb_env_stat(env, &mst);
+ (void)mdb_env_info(env, &mei);
printf("Environment Info\n");
printf(" Map address: %p\n", mei.me_mapaddr);
printf(" Map size: %"Z"u\n", mei.me_mapsize);