summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorAlex Gorrod <alexg@wiredtiger.com>2015-09-22 09:47:11 +1000
committerAlex Gorrod <alexg@wiredtiger.com>2015-09-22 09:47:11 +1000
commit402d1271741e7ac312c947cf67c798990b61a040 (patch)
tree29d40fa9a3a07977e9263547a60ef486124acc9f /examples
parentcfd31ce89b3d66252ff6c404703a29daf78f631a (diff)
downloadmongo-402d1271741e7ac312c947cf67c798990b61a040.tar.gz
Lint in example code.
Diffstat (limited to 'examples')
-rw-r--r--examples/c/ex_extractor.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/examples/c/ex_extractor.c b/examples/c/ex_extractor.c
index 96d23c47f3d..68906bcc743 100644
--- a/examples/c/ex_extractor.c
+++ b/examples/c/ex_extractor.c
@@ -163,17 +163,14 @@ read_index(WT_SESSION *session)
break;
if ((ret = cursor->get_key(cursor, &rec_year)) != 0)
break;
- if ((ret = cursor->get_value(cursor, &last_name,
- &first_name, &term_start, &term_end)) != 0)
+ if ((ret = cursor->get_value(cursor,
+ &last_name, &first_name, &term_start, &term_end)) != 0)
break;
- /*
- * There may be more than one president for
- * this year, get them all.
- */
- while (term_start <= year && year <= term_end &&
- year == rec_year) {
- printf(" %s %s\n", first_name, last_name);
+ /* Report all presidents that served during the chosen year */
+ while (term_start <= year &&
+ year <= term_end && year == rec_year) {
+ printf("\t%s %s\n", first_name, last_name);
if ((ret = cursor->next(cursor)) != 0)
break;
if ((ret = cursor->get_key(cursor, &rec_year)) != 0)