mdbx-tools: fix wrong 'bad sequence' error from mdbx_stat.

This commit is contained in:
Leo Yuriev 2018-06-18 16:36:32 +03:00
parent f314cd6b92
commit 93e3b4129a

View File

@ -152,9 +152,15 @@ int main(int argc, char *argv[]) {
goto env_close;
}
if (envinfo || freinfo) {
(void)mdbx_env_info(env, &mei, sizeof(mei));
} else {
/* LY: zap warnings from gcc */
memset(&mei, 0, sizeof(mei));
}
if (envinfo) {
(void)mdbx_env_stat(env, &mst, sizeof(mst));
(void)mdbx_env_info(env, &mei, sizeof(mei));
printf("Environment Info\n");
printf(" Pagesize: %u\n", mst.ms_psize);
if (mei.mi_geo.lower != mei.mi_geo.upper) {
@ -183,7 +189,6 @@ int main(int argc, char *argv[]) {
} else {
/* LY: zap warnings from gcc */
memset(&mst, 0, sizeof(mst));
memset(&mei, 0, sizeof(mei));
}
if (rdrinfo) {