Minor optimization to rnibble()

- Check for lowercase letters before uppercase. A very minor difference
  as such, but our file digests use lowercase hex and this gets
  called a lot from rpmfiNew().
This commit is contained in:
Panu Matilainen 2012-09-03 15:44:53 +03:00
parent e663722a79
commit 75d88c405b
1 changed files with 2 additions and 2 deletions

View File

@ -97,10 +97,10 @@ static inline unsigned char rnibble(char c)
{
if (c >= '0' && c <= '9')
return (c - '0');
if (c >= 'A' && c <= 'F')
return (c - 'A') + 10;
if (c >= 'a' && c <= 'f')
return (c - 'a') + 10;
if (c >= 'A' && c <= 'F')
return (c - 'A') + 10;
return 0;
}