Fix inappropriate uses of atol()

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Fix inappropriate uses of atol()
Дата
Msg-id a52738ad-06bc-4d45-b59f-b38a8a89de49@eisentraut.org
обсуждение исходный текст
Ответы Re: Fix inappropriate uses of atol()
Список pgsql-hackers
I noticed (during [0]) to some uses of the function atol() seem 
inappropriate.  Either they assume that sizeof(long)==8 and so might 
truncate data if not, or they are gratuitous because the surrounding 
code does not use the long type.  This patch fixes these, by using 
atoll() or atoi() instead.  (There are still some atol() calls left 
after this, which seemed ok to me.)

In the past, Windows didn't have atoll(), but the online documentation 
appears to indicate that this now works in VS 2015 and later, which is 
what we support at the moment.  The Cirrus CI passes.


[0]: 
https://www.postgresql.org/message-id/flat/5d216d1c-91f6-4cbe-95e2-b4cbd930520c@ewie.name
Вложения

В списке pgsql-hackers по дате отправления: