Skip to content

Commit d573130

Browse files
committed
CDRIVER-2173 unused argument
1 parent 87fcd65 commit d573130

File tree

3 files changed

+5
-8
lines changed

3 files changed

+5
-8
lines changed

src/mongoc/mongoc-async-cmd.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ mongoc_async_cmd_result_t
280280
_mongoc_async_cmd_phase_recv_len (mongoc_async_cmd_t *acmd)
281281
{
282282
ssize_t bytes = _mongoc_buffer_try_append_from_stream (
283-
&acmd->buffer, acmd->stream, acmd->bytes_to_read, 0, &acmd->error);
283+
&acmd->buffer, acmd->stream, acmd->bytes_to_read, 0);
284284
uint32_t msg_len;
285285

286286
if (bytes < 0) {
@@ -326,7 +326,7 @@ mongoc_async_cmd_result_t
326326
_mongoc_async_cmd_phase_recv_rpc (mongoc_async_cmd_t *acmd)
327327
{
328328
ssize_t bytes = _mongoc_buffer_try_append_from_stream (
329-
&acmd->buffer, acmd->stream, acmd->bytes_to_read, 0, &acmd->error);
329+
&acmd->buffer, acmd->stream, acmd->bytes_to_read, 0);
330330

331331
if (bytes < 0) {
332332
bson_set_error (&acmd->error,

src/mongoc/mongoc-buffer-private.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,7 @@ ssize_t
6060
_mongoc_buffer_try_append_from_stream (mongoc_buffer_t *buffer,
6161
mongoc_stream_t *stream,
6262
size_t size,
63-
int32_t timeout_msec,
64-
bson_error_t *error);
63+
int32_t timeout_msec);
6564

6665
ssize_t
6766
_mongoc_buffer_fill (mongoc_buffer_t *buffer,

src/mongoc/mongoc-buffer.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -277,20 +277,18 @@ _mongoc_buffer_fill (mongoc_buffer_t *buffer,
277277
* @stream: The stream to read from.
278278
* @size: The number of bytes to read.
279279
* @timeout_msec: The number of milliseconds to wait or -1 for the default
280-
* @error: A location for a bson_error_t, or NULL.
281280
*
282281
* Reads from stream @size bytes and stores them in @buffer. This can be used
283282
* in conjunction with reading RPCs from a stream. You read from the stream
284283
* into this buffer and then scatter the buffer into the RPC.
285284
*
286-
* Returns: bytes read if successful; otherwise -1 and @error is set.
285+
* Returns: bytes read if successful; otherwise 0 or -1.
287286
*/
288287
ssize_t
289288
_mongoc_buffer_try_append_from_stream (mongoc_buffer_t *buffer,
290289
mongoc_stream_t *stream,
291290
size_t size,
292-
int32_t timeout_msec,
293-
bson_error_t *error)
291+
int32_t timeout_msec)
294292
{
295293
uint8_t *buf;
296294
ssize_t ret;

0 commit comments

Comments
 (0)