bitcoin/bitcoin — pull request #2695 by robbak (2013-05-25 12:44:10+00:00)
Title: Explictly cast calculation to int, to allow std::min to work.

When compiling on FreeBSD, the calculation here returns an unsigned int. This causes a compile-time error with std::min, which cannot compare signed with unsigned integers.

This pull inserts an explicit cast, treating the calculated value as signed, keeping the compiler happy.