-
Type: Improvement
-
Resolution: Fixed
-
Priority: Unknown
-
Affects Version/s: None
-
Component/s: None
-
None
Several things I noticed dating back to the original implementation in PHPC-349:
- Structs use uint64_t for fields where libmongoc's API returns int64_t. It's unlikely that these values would ever be negative, but we should keep the original type.
- Request and operation ID are printed as unsigned strings. If a negative value was returned by libmongoc for some reason, this would alter it.
- Printing request and operation ID uses sprintf. Although it's unlikely we'd overflow the string buffer, it'd be safer to use snprintf as we do in the ZVAL_INT64_STRING macro.
I came across this while working on PHPC-2143.