diff options
author | Keith Bostic <keith@wiredtiger.com> | 2015-08-15 14:00:42 -0400 |
---|---|---|
committer | Keith Bostic <keith@wiredtiger.com> | 2015-08-15 14:00:42 -0400 |
commit | 2ce4639fde16cbc8302fb51f1af3dbe3e0ea37fc (patch) | |
tree | c559c2487f11f072d4dafbcfbe02be442c7ca385 /src/cursor/cur_stat.c | |
parent | 9817f522ca4964baa804eb5bd38806724406e303 (diff) | |
download | mongo-2ce4639fde16cbc8302fb51f1af3dbe3e0ea37fc.tar.gz |
We don't use both of the WT_CURSOR_STAT.{stats,stats_first} fields,
remove WT_CURSOR_STAT.stats_first.
Diffstat (limited to 'src/cursor/cur_stat.c')
-rw-r--r-- | src/cursor/cur_stat.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/cursor/cur_stat.c b/src/cursor/cur_stat.c index 82568401319..da9838292d6 100644 --- a/src/cursor/cur_stat.c +++ b/src/cursor/cur_stat.c @@ -113,12 +113,12 @@ __curstat_get_value(WT_CURSOR *cursor, ...) if (F_ISSET(cursor, WT_CURSTD_RAW)) { WT_ERR(__wt_struct_size(session, &size, cursor->value_format, - cst->stats_first[WT_STAT_KEY_OFFSET(cst)].desc, + cst->stats[WT_STAT_KEY_OFFSET(cst)].desc, cst->pv.data, cst->v)); WT_ERR(__wt_buf_initsize(session, &cursor->value, size)); WT_ERR(__wt_struct_pack(session, cursor->value.mem, size, cursor->value_format, - cst->stats_first[WT_STAT_KEY_OFFSET(cst)].desc, + cst->stats[WT_STAT_KEY_OFFSET(cst)].desc, cst->pv.data, cst->v)); item = va_arg(ap, WT_ITEM *); @@ -130,7 +130,7 @@ __curstat_get_value(WT_CURSOR *cursor, ...) * pointer support isn't documented, but it's a cheap test. */ if ((p = va_arg(ap, const char **)) != NULL) - *p = cst->stats_first[WT_STAT_KEY_OFFSET(cst)].desc; + *p = cst->stats[WT_STAT_KEY_OFFSET(cst)].desc; if ((p = va_arg(ap, const char **)) != NULL) *p = cst->pv.data; if ((v = va_arg(ap, uint64_t *)) != NULL) @@ -215,7 +215,7 @@ __curstat_next(WT_CURSOR *cursor) F_CLR(cursor, WT_CURSTD_KEY_SET | WT_CURSTD_VALUE_SET); WT_ERR(WT_NOTFOUND); } - cst->v = cst->stats_first[WT_STAT_KEY_OFFSET(cst)].v; + cst->v = cst->stats[WT_STAT_KEY_OFFSET(cst)].v; WT_ERR(__curstat_print_value(session, cst->v, &cst->pv)); F_SET(cursor, WT_CURSTD_KEY_INT | WT_CURSTD_VALUE_INT); @@ -254,7 +254,7 @@ __curstat_prev(WT_CURSOR *cursor) WT_ERR(WT_NOTFOUND); } - cst->v = cst->stats_first[WT_STAT_KEY_OFFSET(cst)].v; + cst->v = cst->stats[WT_STAT_KEY_OFFSET(cst)].v; WT_ERR(__curstat_print_value(session, cst->v, &cst->pv)); F_SET(cursor, WT_CURSTD_KEY_INT | WT_CURSTD_VALUE_INT); @@ -308,7 +308,7 @@ __curstat_search(WT_CURSOR *cursor) if (cst->key < WT_STAT_KEY_MIN(cst) || cst->key > WT_STAT_KEY_MAX(cst)) WT_ERR(WT_NOTFOUND); - cst->v = cst->stats_first[WT_STAT_KEY_OFFSET(cst)].v; + cst->v = cst->stats[WT_STAT_KEY_OFFSET(cst)].v; WT_ERR(__curstat_print_value(session, cst->v, &cst->pv)); F_SET(cursor, WT_CURSTD_KEY_INT | WT_CURSTD_VALUE_INT); @@ -358,7 +358,7 @@ __curstat_conn_init(WT_SESSION_IMPL *session, WT_CURSOR_STAT *cst) if (F_ISSET(cst, WT_CONN_STAT_CLEAR)) __wt_stat_refresh_connection_stats(&conn->stats); - cst->stats_first = cst->stats = (WT_STATS *)&cst->u.conn_stats; + cst->stats = (WT_STATS *)&cst->u.conn_stats; cst->stats_base = WT_CONNECTION_STATS_BASE; cst->stats_count = sizeof(WT_CONNECTION_STATS) / sizeof(WT_STATS); } @@ -418,7 +418,7 @@ void __wt_curstat_dsrc_final(WT_CURSOR_STAT *cst) { - cst->stats_first = cst->stats = (WT_STATS *)&cst->u.dsrc_stats; + cst->stats = (WT_STATS *)&cst->u.dsrc_stats; cst->stats_base = WT_DSRC_STATS_BASE; cst->stats_count = sizeof(WT_DSRC_STATS) / sizeof(WT_STATS); } |