Change atoi to strtol in same place - Mailing list pgsql-hackers

From Surafel Temesgen
Subject Change atoi to strtol in same place
Date
Msg-id CALAY4q8be6Qw_2J=zOp_v1X-zfMBzvVMkAfmMYv=Ukr=2hPcFQ@mail.gmail.com
Whole thread Raw
Responses Re: Change atoi to strtol in same place  (Tomas Vondra <tomas.vondra@2ndquadrant.com>)
List 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

pgsql-hackers by date:

Previous
From: Nikita Glukhov
Date:
Subject: Re: [PATCH] kNN for btree
Next
From: Alvaro Herrera
Date:
Subject: Re: [PATCH] get rid of StdRdOptions, use individual binaryreloptions representation for each relation kind instead