This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

hires_ms::usecs in winsup/cygwin/times.cc


I have found some odd code in hires_ms::usecs in times.cc around line 600.
There is condition like this: if ((now - initime_ms) < 0). The problem is that
both of the variables are unsigned (DWORD) and the result is unsigned and this
comparison can never be true because unsigned number can never be < 0.

The code should either involve some cast to signed type or should be completely
removed.


VH.

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]