diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2021-02-11 12:49:22 -0500 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2021-02-11 12:49:22 -0500 |
commit | 69036aafb9a8f425fb489125b5075ba7719d20d0 (patch) | |
tree | 8f630dd1d92ef82725a8e5dc2be3a24d0414bd06 /src/backend/access/gist/gistvacuum.c | |
parent | d4c746516b8b4eb0bf993e3729ccc04d1febdb1e (diff) | |
download | postgresql-69036aafb9a8f425fb489125b5075ba7719d20d0.tar.gz postgresql-69036aafb9a8f425fb489125b5075ba7719d20d0.zip |
Simplify jsonfuncs.c code by using strtoint() not strtol().
Explicitly testing for INT_MIN and INT_MAX isn't particularly good
style; it's tedious and may draw useless compiler warnings on
machines where int and long are the same width. We invented
strtoint() precisely for this usage, so use that instead.
While here, remove gratuitous variations in the way the tests for
did-strtoint-succeed were spelled. Also, avoid attempting to
negate INT_MIN; that would probably work given that the result
is implicitly cast to uint32, but I think it's nominally undefined
behavior.
Per gripe from Ranier Vilela, though this isn't his proposed patch.
Discussion: https://postgr.es/m/CAEudQAqge3QfzoBRhe59QrB_5g+NmQUj2QpzqZ9Nc7QepXGAEw@mail.gmail.com
Diffstat (limited to 'src/backend/access/gist/gistvacuum.c')
0 files changed, 0 insertions, 0 deletions