diff options
author | Keith Bostic <keith@wiredtiger.com> | 2015-05-08 12:24:32 -0400 |
---|---|---|
committer | Keith Bostic <keith@wiredtiger.com> | 2015-05-08 12:24:32 -0400 |
commit | 71b2c49ca1e718e63f47af7357a2858c18a3b7f9 (patch) | |
tree | 040d310ef647beef55b9be936662beb2ed5ae885 /examples | |
parent | 369b5d835ba7ca0d5c00bc8aa5da53ea7fe4fd8f (diff) | |
download | mongo-71b2c49ca1e718e63f47af7357a2858c18a3b7f9.tar.gz |
Replace "fprintf(stdout)" with printf(), minor additional simplification.
Diffstat (limited to 'examples')
-rw-r--r-- | examples/c/ex_backup.c | 15 |
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. |