Skip trailing whitespaces when parsing integer options

Michael Paquier <michael@paquier.xyz>

Commit: f7a9a3d4b24a4ad0de7992f01a0dd2a02ccd30a4
Author: Michael Paquier <michael@paquier.xyz>
Date: 2021-07-27T01:39:05Z
Releases: 15.0
Skip trailing whitespaces when parsing integer options

strtoint(), via strtol(), would skip leading whitespaces but the same
rule was not applied for trailing whitespaces, leading to an
inconsistent behavior.  Some tests are changed to cover more this area.

Author: Michael Paquier
Reviewed-by: Kyotaro Horiguchi
Discussion: https://postgr.es/m/YP5Pv0d13Ct+03ve@paquier.xyz

Files

Discussion