On Mon, 15 Oct 2012 18:52:18 +0200, Ludovic Rousseau said:

>I don't know why your code would be better. Maybe it is but you should
>explain.
>
>One problem with your code is that the value used for the debug may
>not be the value really used if an integer overflow occurs.
>You log "timeout_ms" but the function then uses "(int)timeout_ms".
>
>I agree that if an integer overflow occurs we may have other problems.
>And that would be a really big timeout (~24 days).

I see logging the 'long' as an advantage, because at least you have a better 
chance of seeing some huge value *before* you invoke implementation-defined 
behaviour of signed integer truncation.

As you say, such a timeout would be so long it hardly matters.  I don't much 
care.

Cheers,

-- 
____________________________________________________________
Sean McBride, B. Eng                 s...@rogue-research.com
Rogue Research                        www.rogue-research.com 
Mac Software Developer              Montréal, Québec, Canada



------------------------------------------------------------------------------
Don't let slow site performance ruin your business. Deploy New Relic APM
Deploy New Relic app performance management and know exactly
what is happening inside your Ruby, Python, PHP, Java, and .NET app
Try New Relic at no cost today and get our sweet Data Nerd shirt too!
http://p.sf.net/sfu/newrelic-dev2dev
_______________________________________________
libusbx-devel mailing list
libusbx-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libusbx-devel

Reply via email to