Marko Grujic <[email protected]> writes:
>> Would "endptr == nnn" be more direct here? That checks whether no
>> conversion occurred, as described in the quoted doc.

> Agreed, that would be more direct, with one caveat (which
> admittedly doesn't apply today),
> and that is that the endptr-not-at-NUL-byte variant also safe-guards
> against trailing-junk (which Tom mentioned).

Yeah, so I think it's better to use the "*endptr == '\0'" variant.
There's a pretty fair number of other places in our tree that do it
like that, and the ones that don't are mostly explicitly allowing
trailing text.

Pushed.

                        regards, tom lane


Reply via email to