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:
parent
e663722a79
commit
75d88c405b
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue