Re: [exim] More integer annoyances in 4.65

Page principale
Supprimer ce message
Répondre à ce message
Auteur: David Saez Padros
Date:  
À: Marc Perkel
CC: exim-users, Tom Kistner
Sujet: Re: [exim] More integer annoyances in 4.65
Hi !!

>>> OTOH, using an empty string in integer comparisons is definitely a config flaw.
>>>
>> I agree, but in this case continuity is more important.
>>
> I think you should go to the trouble to "do it right".
>
> Doing it right mean that you give the user what they logically expect.
> Thus if you are doing a numberic comparison and you get a null you
> consider it a zero. If you do a string comparison and you get a null you
> get an empty string.


if you do integer comparision between an empty or uninitialized string
with a number you are doing something wrong, only numbers should be
comprable with numbers. Assuming that an uninitilized string is zero
is bad as you do not know what zero means in the context where the
comparision was done, is the one that makes such comparision who should
ensure that this uninitialized string has a meaningful value and that
has been correctly initialized. If the string to compare is not a number
(including an empty string) this is an error made by the one who build
the comparison and if exim assumes that the empty string is zero this
error will probably never be noticed and also probably lead to
unexpected results.

--
Best regards ....

----------------------------------------------------------------
    David Saez Padros                http://www.ols.es
    On-Line Services 2000 S.L.       e-mail  david@???
    Pintor Vayreda 1                 telf    +34 902 50 29 75
    08184 Palau-Solita i Plegamans   movil   +34 670 35 27 53
----------------------------------------------------------------