Skip to content

Commit a13dc52

Browse files
committed
CDRIVER-1522 use llabs for int64 in mongoc-cursor.c
1 parent a8875d2 commit a13dc52

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/mongoc/mongoc-cursor.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -433,7 +433,7 @@ _mongoc_cursor_new (mongoc_client_t *client,
433433
}
434434

435435
if (limit) {
436-
bson_append_int64 (&opts, LIMIT, LIMIT_LEN, labs (limit));
436+
bson_append_int64 (&opts, LIMIT, LIMIT_LEN, llabs (limit));
437437

438438
if (limit < 0) {
439439
bson_append_bool (&opts, SINGLE_BATCH, SINGLE_BATCH_LEN, true);
@@ -1781,7 +1781,7 @@ _mongoc_cursor_next (mongoc_cursor_t *cursor,
17811781
*/
17821782
limit = mongoc_cursor_get_limit (cursor);
17831783

1784-
if (limit && cursor->count >= labs (limit)) {
1784+
if (limit && cursor->count >= llabs (limit)) {
17851785
cursor->done = true;
17861786
RETURN (false);
17871787
}

0 commit comments

Comments
 (0)