@@ -208,7 +208,7 @@ txn_commit (mongoc_client_session_t *session,
208
208
{
209
209
bson_t cmd = BSON_INITIALIZER ;
210
210
bson_t opts = BSON_INITIALIZER ;
211
- bson_error_t err_local ;
211
+ bson_error_t err_local = { 0 } ;
212
212
bson_error_t * err_ptr = error ? error : & err_local ;
213
213
bson_t reply_local = BSON_INITIALIZER ;
214
214
mongoc_write_err_type_t error_type ;
@@ -278,10 +278,10 @@ txn_commit (mongoc_client_session_t *session,
278
278
/* Transactions Spec: "add the UnknownTransactionCommitResult error label
279
279
* when commitTransaction fails with a network error, server selection
280
280
* error, MaxTimeMSExpired error, or write concern failed / timeout." */
281
- if (( !r && err_ptr -> domain == MONGOC_ERROR_SERVER_SELECTION ) ||
281
+ if (!r && ( err_ptr -> domain == MONGOC_ERROR_SERVER_SELECTION ||
282
282
error_type == MONGOC_WRITE_ERR_RETRY ||
283
283
error_type == MONGOC_WRITE_ERR_WRITE_CONCERN ||
284
- err_ptr -> code == MONGOC_ERROR_MAX_TIME_MS_EXPIRED ) {
284
+ err_ptr -> code == MONGOC_ERROR_MAX_TIME_MS_EXPIRED )) {
285
285
/* Drivers MUST unpin a ClientSession when any individual
286
286
* commitTransaction command attempt fails with an
287
287
* UnknownTransactionCommitResult error label. Do this even if we won't
0 commit comments