[exim-dev] [Bug 749] Regression: whitespace should compare …

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Phil Pennock
Dátum:  
Címzett: exim-dev
Tárgy: [exim-dev] [Bug 749] Regression: whitespace should compare numerically equal to zero
------- You are receiving this mail because: -------
You are on the CC list for the bug.

http://bugs.exim.org/show_bug.cgi?id=749




--- Comment #1 from Phil Pennock <exim-dev@???> 2008-08-17 04:23:10 ---
Created an attachment (id=265)
--> (http://bugs.exim.org/attachment.cgi?id=265)
Treat a string consisting only of spaces as numerically zero

This treats any string consisting only of spaces as numerically equal to 0 in
any context where a number is explicitly extracted; I chose to put the test
inside expand_string_integer() instead of in the numeric comparison checks.

The only other callers of expand_string_integer pass it message_size_limit
(global or transport) which should have already been confirmed to be numerical,
so I think this is safe. The empty-string check which PH added was in the
numeric comparison checks but that avoids trying to expand empty strings etc
and makes sense.

So I think this is good but will understand if it's a wrong call. The workload
is tiny, if someone else wants to move the check. ;)


--
Configure bugmail: http://bugs.exim.org/userprefs.cgi?tab=email