We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d0e54c2 commit 42ecaedCopy full SHA for 42ecaed
examples/example-client.c
@@ -53,13 +53,10 @@ main (int argc,
53
NULL, /* Fields, NULL for all. */
54
NULL); /* Read Prefs, NULL for default */
55
56
- while (!mongoc_cursor_error (cursor, &error) &&
57
- mongoc_cursor_more (cursor)) {
58
- if (mongoc_cursor_next (cursor, &doc)) {
59
- str = bson_as_json (doc, NULL);
60
- fprintf (stdout, "%s\n", str);
61
- bson_free (str);
62
- }
+ while (mongoc_cursor_next (cursor, &doc)) {
+ str = bson_as_json (doc, NULL);
+ fprintf (stdout, "%s\n", str);
+ bson_free (str);
63
}
64
65
if (mongoc_cursor_error (cursor, &error)) {
0 commit comments