Skip to content

Commit 3f43d63

Browse files
committed
CDRIVER-680 statement followed by declaration
1 parent a0237ac commit 3f43d63

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/mongoc/mongoc-write-command.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -508,12 +508,14 @@ _mongoc_write_command_will_overflow (uint32_t len_so_far,
508508
int32_t max_bson_size,
509509
int32_t max_write_batch_size)
510510
{
511+
int32_t max_cmd_size;
512+
511513
BSON_ASSERT (max_bson_size);
512514

513515
/* max BSON object size + 16k - 2 bytes for ending NUL bytes.
514516
* server guarantees there is enough room: SERVER-10643
515517
*/
516-
int32_t max_cmd_size = max_bson_size + 16382;
518+
max_cmd_size = max_bson_size + 16382;
517519

518520
if (len_so_far + document_len > max_cmd_size) {
519521
return true;

0 commit comments

Comments
 (0)