summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorKeith Bostic <keith@wiredtiger.com>2015-05-08 12:24:32 -0400
committerKeith Bostic <keith@wiredtiger.com>2015-05-08 12:24:32 -0400
commit71b2c49ca1e718e63f47af7357a2858c18a3b7f9 (patch)
tree040d310ef647beef55b9be936662beb2ed5ae885 /examples
parent369b5d835ba7ca0d5c00bc8aa5da53ea7fe4fd8f (diff)
downloadmongo-71b2c49ca1e718e63f47af7357a2858c18a3b7f9.tar.gz
Replace "fprintf(stdout)" with printf(), minor additional simplification.
Diffstat (limited to 'examples')
-rw-r--r--examples/c/ex_backup.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/examples/c/ex_backup.c b/examples/c/ex_backup.c
index 67872e1b190..75e2cf4789e 100644
--- a/examples/c/ex_backup.c
+++ b/examples/c/ex_backup.c
@@ -97,16 +97,11 @@ compare_backups(int i)
(void)strncpy(msg, "MAIN", sizeof(msg));
else
snprintf(msg, sizeof(msg), "%d", i);
- if (ret == 0)
- fprintf(stdout,
- "Iteration %s: Tables %s.%d and %s.%d identical\n",
- msg, full_out, i, incr_out, i);
- else {
- fprintf(stdout,
- "Iteration %s: Tables %s.%d and %s.%d differ\n",
- msg, full_out, i, incr_out, i);
- exit(1);
- }
+ printf(
+ "Iteration %s: Tables %s.%d and %s.%d %s\n",
+ msg, full_out, i, incr_out, i, ret == 0 ? "identical" : "differ");
+ if (ret != 0)
+ exit (1);
/*
* If they compare successfully, clean up.