diff options
author | Keith Bostic <keith@wiredtiger.com> | 2013-07-17 11:43:29 -0400 |
---|---|---|
committer | Keith Bostic <keith@wiredtiger.com> | 2013-07-17 11:43:29 -0400 |
commit | 65922693f805e973b65b99cf13c76faa628cc090 (patch) | |
tree | e1eb23e803dbe10aed23b8b4ce54a96d64c0c282 /examples | |
parent | 2a6dcba24e67b504bc7c898ca4ef1d4d79bf71a4 (diff) | |
download | mongo-65922693f805e973b65b99cf13c76faa628cc090.tar.gz |
It's bad style (IMNSHO), but declare the WT_ITEM locally to make it
clear the type we're using.
Diffstat (limited to 'examples')
-rw-r--r-- | examples/c/ex_schema.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/examples/c/ex_schema.c b/examples/c/ex_schema.c index 6636b30f335..ba1781aeb88 100644 --- a/examples/c/ex_schema.c +++ b/examples/c/ex_schema.c @@ -64,7 +64,6 @@ main(void) POP_RECORD *p; WT_CONNECTION *conn; WT_CURSOR *cursor; - WT_ITEM value; WT_SESSION *session; const char *country; uint64_t recno, population; @@ -141,6 +140,8 @@ main(void) ret = session->open_cursor(session, "table:poptable", NULL, "raw", &cursor); while ((ret = cursor->next(cursor)) == 0) { + WT_ITEM value; + ret = cursor->get_key(cursor, &recno); ret = cursor->get_value(cursor, &value); ret = wiredtiger_struct_unpack(session, @@ -230,6 +231,8 @@ main(void) ret = session->open_cursor(session, "table:poptable(country,year)", NULL, "raw", &cursor); while ((ret = cursor->next(cursor)) == 0) { + WT_ITEM value; + ret = cursor->get_value(cursor, &value); ret = wiredtiger_struct_unpack( session, value.data, value.size, "5sH", &country, &year); |