From: Peter Eisentraut Date: Mon, 14 Feb 2022 20:29:45 +0000 (+0100) Subject: Remove one use of pg_atoi() X-Git-Tag: REL_15_BETA1~708 X-Git-Url: http://git.postgresql.org/gitweb/?a=commitdiff_plain;h=b45fa793406d6007a787c586c1960b1ffc2ef2fb;p=postgresql.git Remove one use of pg_atoi() There was no real need to use this here instead of a simpler API. Reviewed-by: John Naylor Discussion: https://www.postgresql.org/message-id/flat/b239564c-cad0-b23e-c57e-166d883cb97d@enterprisedb.com --- diff --git a/src/backend/utils/adt/jsonpath_gram.y b/src/backend/utils/adt/jsonpath_gram.y index 7a251b892d7..7311d12e35a 100644 --- a/src/backend/utils/adt/jsonpath_gram.y +++ b/src/backend/utils/adt/jsonpath_gram.y @@ -232,7 +232,7 @@ array_accessor: ; any_level: - INT_P { $$ = pg_atoi($1.val, 4, 0); } + INT_P { $$ = pg_strtoint32($1.val); } | LAST_P { $$ = -1; } ;