[CDRIVER-1378] Accept NULL endptr in bson_ascii_strtoll() Created: 14/Jul/16  Updated: 10/Aug/16  Resolved: 21/Jul/16

Status: Closed
Project: C Driver
Component/s: libbson
Affects Version/s: 1.3.5
Fix Version/s: 1.4.0

Type: Improvement Priority: Trivial - P5
Reporter: Jeremy Mikola Assignee: Jeremy Mikola
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
is related to CDRIVER-1377 bson_ascii_strtoll() does not detect ... Closed

 Description   

strtoll(3) allows NULL for its second argument, making (endptr assignment optional. I propose allowing bson_ascii_strtoll() to do the same for consistency.



 Comments   
Comment by Githook User [ 21/Jul/16 ]

Author:

{u'username': u'bjori', u'name': u'Hannes Magnusson', u'email': u'bjori@10gen.com'}

Message: Merge pull request #167 from jmikola/cdriver-1378

CDRIVER-1378: Accept NULL endptr in bson_ascii_strtoll()
Branch: master
https://github.com/mongodb/libbson/commit/66dfe2b330f07c8a3c37684db84cfa75972ad413

Comment by Githook User [ 21/Jul/16 ]

Author:

{u'username': u'jmikola', u'name': u'Jeremy Mikola', u'email': u'jmikola@gmail.com'}

Message: CDRIVER-1378: Accept NULL endptr in bson_ascii_strtoll()

Implemented in the interest of consistency with strtoll().

Since test_bson_ascii_strtoll() was not testing any assignment to endptr, it can now pass NULL.
Branch: master
https://github.com/mongodb/libbson/commit/e7dcac586a97071ad4b98f96b3e7ef802622056d

Comment by Jeremy Mikola [ 14/Jul/16 ]

https://github.com/mongodb/libbson/pull/167

Generated at Wed Feb 07 21:12:19 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.