On 05/25/2011 02:27 AM, Daniel Ruggeri wrote:
I attached the patch to a bug opened by Cameron Stokes
https://issues.apache.org/bugzilla/show_bug.cgi?id=48841


Just a quick note on the first thing I saw:

+        //worker->lbfactor = atoi(val);
+        worker->lbfactor = strtol(val, NULL, 10);
+        if (errno == EINVAL || worker->lbfactor < 0 || worker->lbfactor > 100)

You should add
errno = 0;
before strtol call if you inspect the errno afterwards.
BTW, what's wrong with the atoi call? We ain't gonna have 64-bit lbfactors,
and the acceptable range is 0 ... 100
Also, don't use C++ comments.


Regards
--
^TM

Reply via email to