On 08/25/2013 12:23 PM, PMHager wrote:
If your intention is performance optimization you could even replace

   if((*p & 0x80) == 0)

with

   if((signed char)(*p) >= 0)

as you cannot assume that all compilers will do it correctly themselves.

Actually, this proposed change relies on a GCC extension. If *p is unsigned, compilers are allowed to assume that (signed char)(*p) >= 0 is always true (because signed overflow is undefined).

--
Florian Weimer / Red Hat Product Security Team
______________________________________________________________________
OpenSSL Project                                 http://www.openssl.org
Development Mailing List                       openssl-dev@openssl.org
Automated List Manager                           majord...@openssl.org

Reply via email to