Skip to content

Commit 5dac066

Browse files
committed
CID-101189 (Coverity) fix side-effect in assertion
1 parent 100b520 commit 5dac066

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/libmongoc/tests/test-mongoc-gridfs.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1349,7 +1349,8 @@ test_find_one_empty (void)
13491349
bson_error_t error = {1, 2, "hello"};
13501350

13511351
client = test_framework_client_new ();
1352-
ASSERT_OR_PRINT (gridfs = get_test_gridfs (client, "list", &error), error);
1352+
gridfs = get_test_gridfs (client, "list", &error);
1353+
ASSERT_OR_PRINT (gridfs, error);
13531354
ASSERT (!mongoc_gridfs_find_one (
13541355
gridfs, tmp_bson ("{'x': 'doesntexist'}"), &error));
13551356

0 commit comments

Comments
 (0)