Change atoi to strtol in same place

From: Surafel Temesgen <surafel3000(at)gmail(dot)com>
To: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Change atoi to strtol in same place
Date: 2019-07-01 17:48:27
Message-ID: CALAY4q8be6Qw_2J=zOp_v1X-zfMBzvVMkAfmMYv=Ukr=2hPcFQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hello,

we use atoi for user argument processing in same place which return zero
for both invalid input and input value zero. In most case its ok because we
error out with appropriate error message for input zero but in same place
where we accept zero as valued input it case a problem by preceding for
invalid input as input value zero. The attached patch change those place to
strtol which can handle invalid input

regards

Surafel

Attachment Content-Type Size
atoi-to-strtol-v1.patch text/x-patch 14.2 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Alvaro Herrera 2019-07-01 18:02:17 Re: [PATCH] get rid of StdRdOptions, use individual binary reloptions representation for each relation kind instead
Previous Message Nikita Glukhov 2019-07-01 17:45:38 Re: [PATCH] kNN for btree